# cat index.html | grep "href=" | cut -d "/" -f 3 | grep "domain\.com" | cut -d '"' -f 1
# for url in $(cat ip.txt); do host $url; done
# for ip in $(seq 130 160); do ping -c 1 192.168.1.$ip done
Araçlar
rdesktop
Netcat
Banner Grabbing;
File Transfer;
Command Execution;
Senaryo 1: Eğer kurban makine doğrudan public ip adresi üzerinden internete erişiyorsa bu senaryo kullanılır. Kurban tarafında herhangi bir port yönlendirmeye ihtiyaç yoktur. Eğer saldırgan firewall/nat arkasında ise bu senaryoyu kulllanırsa kendi tarafında herhangi bir port yönlendirme yapmasına gerek yoktur. (Bind Shell)
Senaryo 2: Eğer kurban makine bir firewall/nat arkasında ise bu durumda saldırgan kendi tarafında bir portu dinlemeye alır.(Ya saldırganın public ip adresiyle internete çıkmalı yada port yönlendirmelidir.) Saldırgan Bu işlemden sonra kurban makineden kendi makinesine reverse shell isteği yollar.
Ncat
nmap tarafından geliştirilmiştir. Güvenlik cihazlarını atlatmak için bazı özelliklere sahiptir. nc clear-text olarak gider. ncat ise aradaki veriyi şifreleyerek gönderir.(Bind Shell)
Passive İnfo Gather
GHDB;
Active İnfo Gather
DNS Lookup : Domain adresinden IP adresini bulma.
Reverse DNS Lookup : Bir IP adresinde bulunan diğer domainlere ulaşma.
Zone transfer
Nmap
nbtscan
NetBIOS name information
rpcclint
enum4linux
Enum4linux is a tool for enumerating information from Windows and Samba systems.
SMTP
Smb User Enumeration;
# for user in $(cat users.txt); do echo VRFY $user | nc -nv IP 25 2 > /dev/null | grep ^"250"; done
Do list adding python script!
smbclient
SNMP
For managing network device. UDP based! IP spoof. Clear-text. Weak Auth. Reflection Attack! Port: 161
snmpenum or snmpcheck (other tool)
Vulnerability Scanning
** slmail rce exploit.
TFTP udp based file transfer protocol. Windows 2003/XP/7. port 69.
Privilege Escalation
Linux
mempodipper - Linux root exploit >=2.6.39 x64 and x86 gcc exploit.c -o exploit
Windows
ms11-080 afd.sys privilege escalation exploit grouppolicy bak
# nmap IP
# nmap -sn IP (ICMP scan!, Ping Sweep, No port Scan)
# nmap -sT --top-ports 20 IP (TCP connection scan, en çok kullanılan 20 port)
# nmap -A IP (get banner, version, os detect, port scan)
# nmap --script *iis* IP
# nmap --script *smb* -p 139,445 IP
# nmap -p 139,445 IP --open (SMB Scan)
# nmap -p 139,445 --script=smb-check-vulns --script-args=unsafe=1 IP (***)
# locate *.nse | grep sbm
# nmap -v -p 80 --script http-vuln-cve2010-2861 IP (Directory Traversal)
# nmap -v -p 80 --script all IP (tested all script)
# nbtscan 192.168.2.0/24
# rpcclient -U "" IP (password is empty)
rpcclient $> getdompwinfo (Get password policy)
# enum4linux -v IP
# nc -nv IP 25 (Banner Info)
VRFY bob (250 user exist)
VRFY dontexist (550 user does not exist)
# smbclient -N -L IP
# nmap -sU --open -p 161 IP
# onesixtyone -c community -i <ip.txt>
# snmpwalk -c public -v1 IP (for weak community string)
# snmpwalk -c public -v1 IP mib-vales (running proccess)
# snmpwalk -c public -v1 IP mib-vales (open port)
# snmpwalk -c public -v1 IP mib-vales (install software)
# cat /etc/issue (distro info)
# uname -a (kernel info )
# net user test test /add
# net localhroup administrators test /add
# net localgroup "Remote Desktop Users" test /add