關(guān)于 Kali 的那些事

唉,本人記性不太好,就把 Kali 相關(guān)的東西放這吧方便查看不定期更新...


1.更改 APT 更新源

vi /etc/apt/sources.list

*1.1官方源

deb http://http.kali.org/kali kali-rolling main non-free contrib
#其實這一條就夠了
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
deb http://security.kali.org/kali-security kali-rolling/updates main contrib non-free

*1.2阿里云kali源

deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
deb http://mirrors.aliyun.com/kali-security kali-rolling/updates main contrib non-free
deb-src http://mirrors.aliyun.com/kali-security kali-rolling/updates main contrib non-free

*1.3中科大kali源

deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb http://mirrors.ustc.edu.cn/kali-security kali-current/updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/kali-security kali-current/updates main contrib non-free

2.Kali Rolling 中文亂碼問題

1.在命令行輸入dpkg-reconfigure locales,(空格是選擇,Tab是切換,*是選中),選中en_US.UTF-8zh_CN.UTF-8,確定后,將en_US.UTF-8選為默認
2.安裝中文字體,apt-get install xfonts-intl-chineseapt-get install ttf-wqy-microhei
3.打開系統(tǒng)設置,找到區(qū)域與語言,將上面改為漢語(中國),重啟

3.kali 升級

*3.1整體更新:

apt-get update #更新軟件包數(shù)據(jù)庫
apt-get upgrade #升級軟件
apt-get dist-upgrade #解決依賴問題
apt-get autoclean #刪除已刪除軟件安裝包
apt-get clean #刪除已安裝軟件安裝包

*3.2 更新Metasploit

msfupdate

4.安裝問題

*4.1 卡格式化

kali有個很奇怪的問題~在格式化分區(qū)的時候,似乎不認識ext4之類的文件系統(tǒng)(特么的自家人都不認識)...以這種文件系統(tǒng)在寫入系統(tǒng),格式化分區(qū)的時候,會無限停在那個位置。
??用工具將分區(qū)格式化成 NTFS 后正常安裝。

*4.2 安裝 .deb 文件

dpkg -i xxxxx.deb

卸載軟件
dpkg remove xxxxx.deb 
#刪除安裝文件,不刪除配置文件

dpkg -P xxxxx.deb
#刪除安裝及配置文件

*4.3 conky 的安裝配置

apt-get install conky

~ 目錄下生成一個配置文件

conky -C > ~/.conkyrc

我的配置文件 .conkyrc

-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
Conky, a system monitor, based on torsmo

Any original torsmo code is licensed under the BSD license

All code written since the fork of torsmo is licensed under the GPL

Please see COPYING for details

Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
Copyright (c) 2005-2012 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
All rights reserved.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
]]

conky.config = {
    alignment = 'bottom_right',
    background = true,
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'lightgreen',
    default_outline_color = 'lightgreen',
    default_shade_color = 'lightgreen',
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    use_xft = true,
    font = 'DejaVu Sans Mono:size=12',
    gap_x = 5,
    gap_y = 60,
    minimum_height = 5,
    minimum_width = 5,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'desktop',
    own_window_argb_visual = true,
    own_window_argb_value = 1,
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false
}

conky.text = [[
#${scroll 16 $nodename - $sysname $kernel on $machine | }
#$hr
${color}Uptime:$color $uptime
${color}Frequency (in MHz):$color $freq
${color}Frequency (in GHz):$color $freq_g
${color}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}
#${color}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${color}CPU Usage:$color $cpu% ${cpubar 4}
${color}Processes:$color $processes  ${color}Running:$color $running_processes
$hr
${color}File systems:
 / $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
${color}Networking:
Up:$color ${upspeed eth0} ${color} - Down:$color ${downspeed eth0}
$hr
${color}Name              PID   CPU%   MEM%
${color} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
]]

conky在桌面上顯示的時候閃爍的問題
安裝sudo apt-get install wmctrl然后修改配置文件里的double_buffer yes,沒有就自己增加。

參考
http://blog.163.com/lixiangqiu_9202/blog/static/535750372012812111141779/

效果圖

*4.4 VMware 的安裝

推薦到官網(wǎng)下載 VMware http://www.vmware.com/products/workstation/workstation-evaluation.html
??我在下載中發(fā)現(xiàn),直接下載的話速度太慢,就通過一臺國外服務器做了中轉(zhuǎn),再取回(服務器下載就是快啊,好幾兆一秒,取回來的時候幾百K,但也比直接下載幾K好啊。)
??下載完后 是個后綴為.bundle的文件,安裝方法如下:

  • chmod +x XXXXX.bundle 賦予執(zhí)行權(quán)限
  • ./XXXXX.bundle 編譯安裝

如果在安裝時遇到提示 找不到 linux-header,輸入apt-get install linux-headers-$(uname -r),來安裝。(你可能需要卸載現(xiàn)在已經(jīng)安裝的)
??遇到執(zhí)行上一步出現(xiàn)無法找到包的情況,可以嘗試把源換成官方,執(zhí)行升級命令,之后再試一次。

注意!如果出現(xiàn)無法找到 gcc 手動卸載已安裝的,再安裝提示版本。(若是出現(xiàn)‘A compatible version of gcc was not found’無法找到兼容的gcc版本,選擇兩次gcc文件,再點擊 install 就好了,這個文件存在于/usr/bin目錄下。)

附上激活碼:

  • 5A02H-AU243-TZJ49-GTC7K-3C61N
  • VY1DU-2VXDH-08DVQ-PXZQZ-P2KV8
  • VF58R-28D9P-0882Z-5GX7G-NPUTF
  • YG7XR-4GYEJ-4894Y-VFMNZ-YA296
  • UC5MR-8NE16-H81WY-R7QGV-QG2D8
  • ZG1WH-ATY96-H80QP-X7PEX-Y30V4
  • GA1T2-4JF1P-4819Y-GDWEZ-XYAY8
  • FY1M8-6LG0H-080KP-YDPXT-NVRV2
  • ZA3R8-0QD0M-489GP-Y5PNX-PL2A6
  • FZ5XR-A3X16-H819Q-RFNNX-XG2EA
  • ZU5NU-2XWD2-0806Z-WMP5G-NUHV6
  • VC58A-42Z8H-488ZP-8FXZX-YGRW8

*4.5 中文輸入法的安裝

apt-get install fcitx-table-wbpy ttf-wqy-microhei ttf-wqy-zenhei    #拼音五筆

apt-get install ibus ibus-pinyin                                    #經(jīng)典的ibus

apt-get install fcitx fcitx-googlepinyin                            #fcitx拼音

ibus具體安裝

apt-get install ibus ibus-clutter ibus-gtk ibus-gtk3 ibus-qt4
im-switch -s ibus
apt-get install ibus-pinyin
ibus-setup //執(zhí)行該命令后會彈出ibus設置窗口,可以設置后重啟電腦就可以使用ibus-pinyin輸入法

*4.6 open-vm-tools的安裝

apt-get update
apt-get install open-vm-tools-desktop fuse

*4.7 VPN安裝

apt-get install network-manager-pptp network-manager-pptp-gnome network-manager-openvpn network-manager-openvpn-gnome

*4.8 安裝 uGet 和 aria2

apt-get install uget aria2
安裝后可利用 uGet 下載百度云的文件


5.查看系統(tǒng)版本

*5.1 查看系統(tǒng)發(fā)行版本

cat /etc/issue

*5.2 查看內(nèi)核版本

cat /proc/version

*5.3 查看系統(tǒng)位數(shù)

getconf LONG_BIT
顯示多少就是多少位啦


6.工具利用

*6.1 wget

wget 是個很好用的工具,常用來下載。比如:

wget http://cdn2.ime.sogou.com/dl/index/1475146281/sogoupinyin_2.1.0.0082_i386.deb?st=Vl6CzfMX0bSYbf5xCnk17Q&e=1477909376&fn=sogoupinyin_2.1.0.0082_i386.deb

這是下載搜狗輸入法,其格式為 wget [url]
有的下載需要參數(shù):wget -no-check-certificate [url] 這是帶了一個不檢查證書的參數(shù)

這是別人寫的比較詳細的介紹
http://www.cnblogs.com/peida/archive/2013/03/18/2965369.html

在做滲透測試的時候,收集信息往往是比較重要的一環(huán),有時需要查看網(wǎng)站源碼,那么就可以用 wget 來整站下載,以便收集更多信息。

wget -U "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB5)" -r -p -k -nc -o down.log [url]
  • -U 修改agent,偽裝成指定瀏覽器
  • -r 遞歸。對于HTTP主機,wget首先下載URL指定的文件,然后(如果該文件是一個HTML文檔的話)遞歸下載該文件所引用(超級連接)的所有文件(遞 歸深度由參數(shù)-l指定)。對FTP主機,該參數(shù)意味著要下載URL指定的目錄中的所有文件,遞歸方法與HTTP主機類似
  • -c 指定斷點續(xù)傳功能。實際上,wget默認具有斷點續(xù)傳功能,只有當下載了某一文件的一部分,并希望wget接著完成此工作的時候,才需要指定此參數(shù)
  • -nc 不下載已經(jīng)存在的文件-np 表示不跟隨鏈接,只下載指定目錄及子目錄里的東西
  • -p 下載頁面顯示所需的所有文件。比如頁面中包含了圖片,但是圖片并不在/yourdir目錄中,而在/images目錄下,有此參數(shù),圖片依然會被正常下載
  • -k 修復下載文件中的絕對連接為相對連接

詳細介紹 http://www.cnblogs.com/lidp/archive/2010/03/02/1696447.html

百度云文件下載

wget -c "url"

url可以先通過瀏覽器獲取,再復制過來


7.其它設置

*7.1 添加sudo權(quán)限

編輯 /etc/sudoers
找到 root ALL(ALL:ALL) ALL
添加 xxx ALL(ALL) ALL xxx為用戶名

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容