0x00 Synaptic
Synaptic(新立得)是一個高級軟件包管理器,它可以管理系統內安裝的每個軟件及包組件,在圖形界面內完成LINUX系統軟件的搜尋、安裝和刪除。
Synaptic安裝簡單,命令如下:
yogy@kali:~$ sudo apt-get install synaptic
運行Synaptic,輸入關鍵詞后,可篩選列舉更新源中獲取的所有相關包。
0x01 OpenVPN
使用國外VPS搭建OpenVPN,實現本地Kali客戶端與遠程Ubuntu服務端的VPN通信。
服務端
- 下載並安裝 LZO && OpenSSL && OpenVPN
- 生成密鑰文件
密鑰文件secret.key需拷貝至客戶端root@server:/# openvpn --genkey --secret /etc/openvpn/secret.key - 服務端配置文件
root@server:/# vi /et/openvpn/server.confdev tun
ifconfig 172.16.10.1 172.16.10.2
keepalive 10 60
proto tcp-server
port 1119
#user nobody
#group nogroup
persist-tun
persist-key
comp-lzo
verb 3
secret /etc/openvpn/secret.key - 添加開機啟動
root@server:/# vi /etc/rc.localecho "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 172.16.10.1/32 -o venet0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 172.16.10.2/32 -o venet0 -j MASQUERADE
/usr/local/sbin/openvpn /etc/openvpn/server.conf &
exit 0
客戶端
- 拷貝密鑰文件至/etc/openvpn/secret.key
- 客戶端配置文件
yogy@kali:~$ sudo vi /etc/openvpn/client.ovpndev tun
remote 12.34.56.78 # remote ip address of openvpn server
ifconfig 172.16.10.2 172.16.10.1
keepalive 10 60
proto tcp-client
port 1119
persist-tun
persist-key
comp-lzo
verb 3
secret /etc/openvpn/secret.key
redirect-gateway def1 - 運行OpenVPN建立通信
yogy@kali:~$ sudo openvpn /etc/openvpn/client.ovpnSat Jul 11 12:11:55 2015 OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Dec 1 2014
...
Sat Jul 11 12:11:57 2015 Initialization Sequence Completed
0x02 VirtualBox
VirtualBox小巧精悍,適合用於Kali中運行Windows7虛擬機。
- 添加源及密鑰
yogy@kali:~$ sudo echo "deb http://download.virtualbox.org/virtualbox/debian wheezy contrib" >> /etc/apt/sources.list yogy@kali:~$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add - - 更新源並安裝
yogy@kali:~$ sudo apt-get update yogy@kali:~$ sudo apt-get install virtualbox-4.3 dkms - 修改虛擬系統文件大小
yogy@kali:~/VirtualBox VMs/win7$ vboxmanage modifyhd win7.vdi --resize 52428 - 刪除多余內核
yogy@kali:~$ dpkg --get-selections | grep linux-image linux-image-3.18.0-kali3-amd64 install linux-image-3.7-trunk-amd64 install yogy@kali:~$ uname -a Linux kali 3.18.0-kali3-amd64 #1 SMP Debian 3.18.6-1~kali2 (2015-03-02) x86_64 GNU/Linux yogy@kali:~$ sudo apt-get remove linux-image-3.7-trunk-amd64 yogy@kali:~$ sudo apt-get autoclean -
USB賦權
- 將當前用戶加入vboxusers組
yogy@kali:sudo /usr/sbin/usermod -G vboxusers -a yogy -
查詢vboxusers組編號
yogy@kali:~$ cat /etc/group | grep vboxusersvboxusers:x:137:yogy
-
添加讀寫權限
yogy@kali:~$ sudo echo "none /proc/bus/usb usbfs devgid=137,devmode=664 0 0" >> /etc/fstab
- 將當前用戶加入vboxusers組
- 啟動USB
下載並添加VirtualBox擴展包,啟動USB 2.0控制器,分配USB設備。
0x03 Code::Blocks
Code::Blocks是一款輕量級開源跨平台C/C++ IDE,極力推薦。
- 官網下載源碼
- 二次解壓*.tar.xz
yogy@kali:~/Downloads$ xz -d codeblocks-13.12-1_amd64.debian.stable.tar.xz yogy@kali:~/Downloads$ tar -zxvf codeblocks-13.12-1_amd64.debian.stable.tar - 安裝*.deb
yogy@kali:~/Downloads$ cd /debian-stable/amd64 yogy@kali:~/Downloads/debian-stable/amd64$ sudo dpkg -i *.deb yogy@kali:~/Downloads/debian-stable/amd64$ sudo apt-get -f install yogy@kali:~/Downloads/debian-stable/amd64$ sudo dpkg -i codeblocks-common_13.12-1_all.deb - 修改輸出終端
Environment settings -- General settings -- Terminal to launch console programs: gnome-terminal -t $TITLE -x - 漢化(可選)
- 下載*.mo
- 移至指定目錄
yogy@kali:~/Downloads$ mkdir -p /usr/share/codeblocks/locale/zh_CN yogy@kali:~/Downloads$ cp codeblocks.mo /usr/share/codeblocks/locale/zh_CN - Environment settings -- View -- Internationalization: Chinese (Simplified)
0x04 Pycharm
給最愛的Python,配最好的IDE。
-
修改java版本
yogy@kali:~$ update-alternatives --config java有 2 個候選項可用於替換 java (提供 /usr/bin/java)。
選擇 路徑 優先級 狀態
* 0 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 自動模式
1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 手動模式
2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1051 手動模式
要維持當前值[*]請按回車鍵,或者鍵入選擇的編號:2yogy@kali:~$ update-alternatives --config javac有 2 個候選項可用於替換 javac (提供 /usr/bin/javac)。
選擇 路徑 優先級 狀態
* 0 /usr/lib/jvm/java-6-openjdk-amd64/bin/javac 1061 自動模式
1 /usr/lib/jvm/java-6-openjdk-amd64/bin/javac 1061 手動模式
2 /usr/lib/jvm/java-7-openjdk-amd64/bin/javac 1051 手動模式
要維持當前值[*]請按回車鍵,或者鍵入選擇的編號:2
update-alternatives: using /usr/lib/jvm/java-7-openjdk-amd64/bin/javac to provide /usr/bin/javac (javac) in 手動模式 - 下載並安裝
yogy@kali:~/Downloads$ wget http://download-cf.jetbrains.com/python/pycharm-professional-4.5.2.tar.gz yogy@kali:~/Downloads$ sudo tar -zxvf pycharm-professional-4.5.2.tar.gz yogy@kali:~/Downloads$ sudo cp -r pycharm-4.5.2 /opt/ - 獲取注冊碼
Jetbrains旗下產品,學生可通過University email address、ISIC/ITIC membership、Official document三種方式免費申請。 -
創建快捷方式
-
手動創建
yogy@kali:/usr/share/applications$ sudo gedit jetbrains-pycharm.desktop[Desktop Entry]
Version=1.0
Type=Application
Name=PyCharm
Icon=/opt/pycharm-4.5.2/bin/pycharm.png
Exec="/opt/pycharm-4.5.2/bin/pycharm.sh" %f
Comment=Develop with pleasure!
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-pycharm -
軟件創建
Configure -- Creat Desktop Entry
-
0x05 ns-3
ns-3是針對互聯網系統的離散事件網絡仿真平台,主要用於研究。
- 下載ns-3源碼
yogy@kali:/home/yogy/Workspace$ wget http://www.nsnam.org/release/ns-allinone-3.23.tar.bz2 yogy@kali:/home/yogy/Workspace$ tar xjf ns-allinone-3.23.tar.bz2 -
安裝Doxygen
yogy@kali:~/Downloads$ wget http://jaist.dl.sourceforge.net/project/doxygen/rel-1.8.10/doxygen-1.8.10.linux.bin.tar.gz yogy@kali:~/Downloads/doxygen-1.8.10$ gedit MakefileRM = rm -f
VERSION = 1.8.10
INSTALL = /usr/local
INSTTOOL = /usr/bin/install
DOXYDOCS = ..
export TMAKEPATH
install:
$(INSTTOOL) -d $(INSTALL)/bin
$(INSTTOOL) -d $(INSTALL)/doc/doxygen
$(INSTTOOL) -m 755 bin/doxygen $(INSTALL)/binyogy@kali:~/Downloads/doxygen-1.8.10$ ./configure yogy@kali:~/Downloads/doxygen-1.8.10$ sudo make yogy@kali:~/Downloads/doxygen-1.8.10$ sudo make install - 生成文檔
yogy@kali:~/Workspace/ns-allinone-3.23/ns-3.23$ doxygen doc/doxygen.conf yogy@kali:~/Workspace/ns-allinone-3.23/ns-3.23/doc$ sudo easy_install Sphinx dia yogy@kali:~/Workspace/ns-allinone-3.23/ns-3.23/doc/tutorial$ make html yogy@kali:~/Workspace/ns-allinone-3.23/ns-3.23/doc/manual$ make html yogy@kali:~/Workspace/ns-allinone-3.23/ns-3.23/doc/models$ make html - 編譯運行
yogy@kali:~/Workspace/ns-allinone-3.23/ns-3.23$ ./waf configure --enable-tests --enable-examples yogy@kali:~/Workspace/ns-allinone-3.23/ns-3.23$ ./waf --run hello-simulator
0x06 ndnSIM
- 安裝依賴庫
yogy@kali:~$ sudo aptitude install libboost-all-dev yogy@kali:~$ sudo apt-get install python-dev python-pygraphviz python-kiwi python-pygoocanvas python-gnome2 python-rsvg ipython - 下載ndnSIM源碼
yogy@kali:~/Workspace$ mkdir ndnSIM yogy@kali:~/Workspace/ndnSIM$ git clone -b ndnSIM-v1 git://github.com/cawka/ns-3-dev-ndnSIM ns-3 yogy@kali:~/Workspace/ndnSIM$ git clone git://github.com/cawka/pybindgen.git pybindgen yogy@kali:~/Workspace/ndnSIM$ git clone -b master-v1 git://github.com/named-data/ndnSIM.git ns-3/src/ndnSIM - 編譯運行
yogy@kali:~/Workspace/ndnSIM/ns-3$ ./waf configure --enable-tests --enable-examples yogy@kali:~/Workspace/ndnSIM/ns-3$ ./waf --run=ndn-simple --vis
0x07 Eclipse
Eclipse+CDT實現C/C++編程,並修改配置以調試ns-3。
- 安裝Eclipse
yogy@kali:~$ sudo apt-get install eclipse eclipse-cdt eclipse-cdt-pkg-config - 配置用於ns-3
- 新建ns-3項目
New -- C++ Project
Project name: ns-3.23
Location: /home/yogy/Workspace/ns-allinone-3.23/ns-3.23 - 配置Waf編譯器
Builder Settings:
Build command: ${workspace_loc:/ns-3.23}/waf
Build directory: ${workspace_loc:/ns-3.23}/build
Behaviour:
Build(Incremental Build): all --> build - 配置調試器
Run -- Debug Configurations:
C/C++ Application: build/src/ndnSIM/examples/ns3-dev-ndn-tree-cs-tracers-debug
Project: ns-3.23
Environment -- New:
Variable: LD_LIBRARY_PATH
Value: ${workspace_loc:/ns-3.23}/build
- 新建ns-3項目
0x08 Tex
Tex是一套優秀的電子排版系統,常用於論文寫作。
- 安裝TeXLive
- 下載texlive2015.iso
- 掛載鏡像
yogy@kali:~/Downloads$ sudo mount -o loop texlive2015.iso /mnt/ yogy@kali:~/Downloads$ cd /mnt yogy@kali:/mnt# ./install-tl - 修改環境變量
yogy@kali:~$ vim ~/.bashrc# TeX Live 2015export
MANPATH=${MANPATH}:/usr/local/texlive/2015/texmf-dist/doc/manexport INFOPATH=${INFOPATH}:/usr/local/texlive/2015/texmf-dist/doc/infoexport PATH=${PATH}:/usr/local/texlive/2015/bin/x86_64-linux
- 添加字體
yogy@kali:~$ sudo apt-get install ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy yogy@kali:~$ cp /home/yogy/Downloads/fonts/* ~/.fonts/ - 安裝TeXstudio
yogy@kali:~$ sudo apt-get install exstudio
0x09 WPS
不穩定,用於臨時查看 *.doc / *.ppt / .*xls。
- 安裝32位框架
yogy@kali:~$ sudo dpkg --add-architecture i386 yogy@kali:~$ dpkg --print-architecture amd64 yogy@kali:~$ dpkg --print-foreign-architectures i386 yogy@kali:~$ sudo apt-get update && sudo apt-get upgrade yogy@kali:~$ sudo apt-get -f install yogy@kali:~$ sudo apt-get install libc6-i386 ia32-libs libnotify-bin ia32-libs-gtk - 下載並安裝WPS
yogy@kali:~/Downloads$ wget http://wdl1.cache.wps.cn/wps/download/Linux/unstable/wps-office_8.1.0.3724~b1p2_i386.deb yogy@kali:~/Downloads$ sudo dpkg -i wps-office_8.1.0.3724-b1p2_i386.deb - 添加缺失字體
yogy@kali:~/Downloads$ cp {Wingdings\ 2.ttf,Wingdings\ 3.ttf,Wingdings.ttf,webdings.ttf,MTExtra.ttf} ~/.fonts/ yogy@kali:~/Downloads$ sudo fc-cache -fv
0x0a Audacious
Audacious是一個支持多種格式輕巧快速的音樂播放器,可解決多數外文亂碼問題。
- 安裝
yogy@kali:~$ sudo apt-get install audacious - 配置
外觀 -- 界面: Winamp Classic Interface
外觀 -- 界面設置 -- 使用點陣字體:取消
首選項 -- 播放列表:
自動檢測下列編碼: 漢語
備用字符編碼: GBK - 播放列表為 *.m3u
0x0b Wine
Wine是一個能夠在多種POSIX-compliant操作系統(諸如 Linux,Mac OSX 及 BSD 等)上運行 Windows 應用的兼容層。
- 添加32位框架支持
yogy@kali:~$ sudo dpkg --add-architecture i386 yogy@kali:~$ sudo apt-get update - 安裝32位Wine
yogy@kali:~$ sudo apt-get install wine-bin:i386
0x0c MongoDB
MongoDB是開源文檔型數據庫,是非關系型數據庫(NoSql)中流行的一種。
- 添加源及密鑰
yogy@kali:~$ echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list yogy@kali:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 - 更新源並安裝
yogy@kali:~$ sudo apt-get update yogy@kali:~$ sudo apt-get install -y mongodb-org - 禁止版本更新
yogy@kali:~$ echo "mongodb-org hold" | sudo dpkg --set-selections yogy@kali:~$ echo "mongodb-org-server hold" | sudo dpkg --set-selections yogy@kali:~$ echo "mongodb-org-shell hold" | sudo dpkg --set-selections yogy@kali:~$ echo "mongodb-org-mongos hold" | sudo dpkg --set-selections yogy@kali:~$ echo "mongodb-org-tools hold" | sudo dpkg --set-selections -
運行
- 啟動
yogy@kali:~$ sudo service mongod start -
驗證
yogy@kali:~$ sudo vim /var/log/mongodb/mongod.log2015-08-27T20:49:03.357+0800 I JOURNAL [initandlisten] journal dir=/var/lib/mongodb/journal
...
2015-08-27T20:49:03.764+0800 I NETWORK [initandlisten] waiting for connections on port 27017 -
終止
yogy@kali:~$ sudo service mongod stop
- 啟動
0x0d GitHub
作為開源代碼庫以及版本控制系統,Github擁有140多萬開發者用戶。
- 建立Git
yogy@kali:~$ sudo apt-get install git yogy@kali:~$ git config --global user.name "yogykwan" yogy@kali:~$ git config --global user.email "jingg.cxy@foxmail.com" - HTTPS認證
-
yogy@kali:~$ git config --global credential.helper cache yogy@kali:~$ git config --global credential.helper 'cache --timeout=3600'
-
- SSH認證
- 確認已有ssh key
ls -al ~/.ssh - 生成密鑰
ssh-keygen -t rsa -b 4096 -C "jingg.cxy@foxmail.com" - 確認開啟ssh
eval "$(ssh-agent -s)" - 本地添加密鑰
ssh-add /home/yogy/.ssh/id_rsa - 遠端添加密鑰,將~/.ssh/id_rsa.pub內容復制到SSH keys
- 測試連接
ssh -T git@github.com
- 確認已有ssh key
0x0e Webstorm
與Pycharm同屬Jetbrains旗下,主要用於開發Javascript,Web前端開發神器。
- 下載並安裝
yogy@kali:~/Downloads$ wget http://download-cf.jetbrains.com/webstorm/WebStorm-10.0.4.tar.gz yogy@kali:~/Downloads$ sudo tar -zxvf WebStorm-10.0.4.tar.gz yogy@kali:~/Downloads$ sudo cp -r WebStorm-141.1550 /opt/ - 獲取注冊碼
Jetbrains旗下產品,學生可通過University email address、ISIC/ITIC membership、Official document三種方式免費申請。 -
創建快捷方式
-
手動創建
yogy@kali:/usr/share/applications$ sudo gedit jetbrains-webstorm.desktop[Desktop Entry]
Version=1.0
Type=Application
Name=WebStorm
Icon=/opt/WebStorm-141.1550/bin/webide.png
Exec="/opt/WebStorm-141.1550/bin/webstorm.sh" %f
Comment=Develop with pleasure!
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-webstorm -
軟件創建
Configure -- Creat Desktop Entry
-
- 安裝SASS
yogy@kali:/$ sudo su -c "gem install sass"
0x0f µTorrent
µTorrent是各大BT網站指定下載工具。
- 下載並解壓
- 添加配置文件
yogy@kali:~/utorrent-server-alpha-v3_3$ vim utserver.conf#Internal Settings
ut_webui_port: 8080
dir_active: /home/yogy/PT/.tmp/
dir_completed: /home/yogy/PT/
preferred_interface: eth0
#Regular Settings
#傳入鏈接所使用的端口
bind_port: 5158
#最大上傳速度(kb/s)
max_ul_rate: 50000
#最大下載速度(kb/s)
max_dl_rate: 50000
#全局最大鏈接數
max_total_connections: 800
#每個Torrent的最大鏈接數
conns_per_torrent: 500
#每個Torrent的上傳通道數
ul_slots_per_torrent: 6 - 運行
./utserver - 打開WebUI,登錄admin賬戶(無密碼)
- 添加從PT網站下載的.torrent種子文件
0x10 一鍵安裝
yogy@kali:~$ sudo apt-get install gimp #圖片 yogy@kali:~$ sudo apt-get install okular #PDF yogy@kali:~$ sudo apt-get install smplayer #視頻
0x11 結束語
常用軟件記錄完畢,Kali特性待另開新篇。
