Skip to content

Commit 3bd15c4

Browse files
authored
Initial Commit
Converted old Joplin Pentest Template to Obsidian
1 parent 5177232 commit 3bd15c4

File tree

88 files changed

+4596
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+4596
-0
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
Created by TJ Null:
2+
3+
Twitter: https://twitter.com/TJ_Null
4+
GitHub: https://github.com/tjnull
5+
6+
Contribution:
7+
8+
If you would like to contribute to the template or provide suggestions, then you can submit an issue on the GitHub Repo here:
9+
- https://github.com/tjnull/TJ-OPT
10+
11+
## Changelog:
12+
13+
## Changelog for Obsidian
14+
15+
v1.0 Dusting off the books
16+
17+
- Refactored and cleaned up noting structure to align with how Obsidian displays raw markdown.
18+
- Separated the Pivoting-Tunneling section to show a set of commands to use for either Windows or Linux.
19+
- Added a new section to enumerate email services.
20+
- Included two scripts (Python & Golang) to with instructions on how you can send a mass email for phishing campaigns.
21+
- New section for using Rustscan
22+
- New section for using SQLMap
23+
- New section for enumerating websites with Feroxbuster
24+
- New section on enumerating and exploiting AD CS certificates
25+
- Updated Bypassing AV section with new tools
26+
- Updated BloodHound section to include the new version of BloodHound Community
27+
- Updated Mimikatz section
28+
- New Section on Decrypting VNC Passwords
29+
- Replaced all crackmapexec commands with NetExec due to change in contribution of the project.
30+
## Changelog for Joplin
31+
32+
v1.0: Original Template
33+
34+
v2.0 The first chapter
35+
36+
2. Enumeration
37+
- Added an FTP Notebook to include notes for that identified service
38+
- Added more content in Active Directory
39+
- Web has a subnotebook to include any content from the changelog.txt file
40+
- Fixed the gobuster oneliners to match with the recent changes from the tool
41+
42+
3. Exploitation
43+
- Added some custom options for searchsploit
44+
45+
4. Post Exploitation
46+
- Moved the subnotebook into a subnotebook (Target #1) so the user can copy the subnotebook and add another one under post exploitation for other targets.
47+
- Created a sub notebook to include the output from automated priv esc scripts that are used.
48+
- Included tools, tips, and resources in all sections for priv esc
49+
50+
v3.0 Major Refactoring Overhaul
51+
- Added sub notebooks (Recon Targets, Enumeration Targets, Exploitation Targets, Post Exploitation Targets). Makes it easier to organize all of the notes you have for assessing the targets instead of having them cluttered in your other notes.
52+
- Broke down the recon notes to include a discovery and a host scan sub notebooks
53+
- Moved Pivot/Tunneling into the Recon Notes Section. [Pivoting/Tunneling](../Pentest%20Template%20Master%203.0/1.%20Recon%20Notes/Pivoting_Tunneling.md)
54+
- Moved Reporting into High Value Information/Reporting SubNotebook
55+
- New section for impacket ntlmrelayx [Impacket NtlmRelayX](../Pentest%20Template%20Master%203.0/3.%20Enumeration%20Notes/Impacket%20NtlmRelayX.md)
56+
- New section for pretender [Pretender](../Pentest%20Template%20Master%203.0/3.%20Enumeration%20Notes/Pretender.md)
57+
- New section or clean up with responder [Responder](../Pentest%20Template%20Master%203.0/3.%20Enumeration%20Notes/Responder.md)
58+
- New section including how to use villian [Villian Cheatsheet](../Pentest%20Template%20Master%203.0/5.%20Exploitation%20Notes/Villian%20Cheatsheet.md)
59+
- New section for editable services [General Notes](../Pentest%20Template%20Master%203.0/7.%20Post%20Exploitation/Editable%20Services/General%20Notes.md)
60+
- Added a new PWK V2/V3 OSCP Report Template [OSCP Report Template V2](../Pentest%20Template%20Master%203.0/9.%20High%20Value%20Information_Reporting/Reporting/OSCP%20Report%20Template%20V2.md)
61+
- Added a PowerShell ISO oneliner if you want to launch your payloads through an ISO [General Notes](../Pentest%20Template%20Master%203.0/5.%20Exploitation%20Notes/General%20Notes.md)
62+
63+
64+
Shoutout to TheGetch (https://github.com/TheGetch) for sharing some of his notes and giving me some inspiration to the hierarchy he has.
65+
66+
If you want to see his current methodology you can find it here: https://github.com/TheGetch/Penetration-Testing-Methodology
67+
68+
v4.0 Dusting off the books
69+
70+
- Refactored and cleaned up noting structure to align with how Obsidian displays raw markdown.
71+
- Separated the Pivoting-Tunneling section to show a set of commands to use for either Windows or Linux.
72+
- Added a new section to enumerate email services.
73+
- Included two scripts (Python & Golang) to with instructions on how you can send a mass email for phishing campaigns.
74+
- New section for using Rustscan
75+
- New section for using SQLMap
76+
- New section for enumerating websites with Feroxbuster
77+
- New section on enumerating and exploiting AD CS certificates
78+
- Updated Bypassing AV section with new tools
79+
- Updated BloodHound section to include the new version of BloodHound Community
80+
- Updated Mimikatz section
81+
- New Section on Decrypting VNC Passwords
82+
- Replaced all crackmapexec commands with NetExec due to change in contribution of the project.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#recon
2+
# DNS Discovery
3+
4+
DNSRecon:
5+
6+
- dnsrecon -d www.example.com -a
7+
- dnsrecon -d www.example.com -t axfr
8+
- dnsrecon -d "startIP-endIP"
9+
- dnsrecon -d www.example.com -D "namelist" -t brt
10+
11+
Dig:
12+
13+
- dig www.example.com + short
14+
- dig www.example.com MX
15+
- dig www.example.com NS
16+
- dig www.example.com> SOA
17+
- dig www.example.com ANY +noall +answer
18+
- dig -x www.example.com
19+
- dig -4 www.example.com (For IPv4)
20+
- dig -6 www.example.com (For IPv6)
21+
- dig www.example.com mx +noall +answer example.com ns +noall +answer
22+
- dig -t AXFR www.example.com
23+
24+
Dnsenum Enumeration:
25+
26+
- dnsenum --dnsserver 172.21.0.0 -enum intranet.megacorpone.xx
27+
- dnsenum --dnsserver 172.21.0.0 -enum management.megacorpone.xx
28+
- dnsenum --dnsserver 172.21.0.0 -enum www.megacorpone.xx
29+
30+
dnsX Enumeration:
31+
- dnsx -l domains.txt -resp -a -aaaa -cname -mx -ns -soa -txt
32+
- dnsx -silent -d megacorpone.com -w /usr/share/seclists/Discovery/DNS/dns-Jhaddix.txt
33+
34+
Using with subfinder:
35+
- subfinder -silent -d megacorpone.com | dnsx -silent
36+
- subfinder -silent -d megacorpone.com | dnsx -silent -a -resp
37+
- subfinder -silent -d megacorpone.com | dnsx -silent -a -resp-only
38+
- subfinder -silent -d megacorpone.com | dnsx -silent -cname -resp
39+
- subfinder -silent -d megacorpone.com | dnsx -silent -asn
40+
41+
42+
Nmap Enumeration:
43+
```
44+
$ ls -lh /usr/share/nmap/scripts/ | grep dns
45+
-rw-r--r-- 1 root root 1.5K Nov 1 2023 broadcast-dns-service-discovery.nse
46+
-rw-r--r-- 1 root root 5.3K Nov 1 2023 dns-blacklist.nse
47+
-rw-r--r-- 1 root root 9.9K Nov 1 2023 dns-brute.nse
48+
-rw-r--r-- 1 root root 6.5K Nov 1 2023 dns-cache-snoop.nse
49+
-rw-r--r-- 1 root root 15K Nov 1 2023 dns-check-zone.nse
50+
-rw-r--r-- 1 root root 15K Nov 1 2023 dns-client-subnet-scan.nse
51+
-rw-r--r-- 1 root root 10K Nov 1 2023 dns-fuzz.nse
52+
-rw-r--r-- 1 root root 3.8K Nov 1 2023 dns-ip6-arpa-scan.nse
53+
-rw-r--r-- 1 root root 13K Nov 1 2023 dns-nsec3-enum.nse
54+
-rw-r--r-- 1 root root 11K Nov 1 2023 dns-nsec-enum.nse
55+
-rw-r--r-- 1 root root 3.4K Nov 1 2023 dns-nsid.nse
56+
-rw-r--r-- 1 root root 4.3K Nov 1 2023 dns-random-srcport.nse
57+
-rw-r--r-- 1 root root 4.3K Nov 1 2023 dns-random-txid.nse
58+
-rw-r--r-- 1 root root 1.5K Nov 1 2023 dns-recursion.nse
59+
-rw-r--r-- 1 root root 2.2K Nov 1 2023 dns-service-discovery.nse
60+
-rw-r--r-- 1 root root 5.6K Nov 1 2023 dns-srv-enum.nse
61+
-rw-r--r-- 1 root root 5.7K Nov 1 2023 dns-update.nse
62+
-rw-r--r-- 1 root root 2.1K Nov 1 2023 dns-zeustracker.nse
63+
-rw-r--r-- 1 root root 26K Nov 1 2023 dns-zone-transfer.nse
64+
-rw-r--r-- 1 root root 3.9K Nov 1 2023 fcrdns.nse
65+
```
66+
-nmap x.x.x.x -v -p 53 --script=exampleScript1.nse,exampleScript2.nse
67+
68+
69+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#recon
2+
# Domain Discovery
3+
4+
Sublis3r:
5+
6+
- Sublist3r -d www.example.com
7+
- Sublist3r -v -d www.example.com -p 80,443
8+
9+
Subfinder:
10+
- subfinder -d megacorpone.com
11+
12+
OWASP AMASS:
13+
14+
- amass enum -d www.example.com
15+
- amass intel -whois -d www.example.com
16+
- amass intel -active 172.21.0.0-64 -p 80,443,8080,8443
17+
- amass intel -ipv4 -whois -d www.example.com
18+
- amass intel -ipv6 -whois -d www.example.com
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
#recon #scanning-enumeration
2+
# NetDiscover (ARP Scanning):
3+
- netdiscover -i eth0
4+
- netdiscover -r 172.21.10.0/24
5+
6+
# Dsniff Arpspoof
7+
8+
First enable Linux box to act as a router:
9+
10+
`echo 1 > /proc/sys/net/ipv4/ip_forward`
11+
12+
Then run `arpspoof`:
13+
14+
`arpspoof -i <interface> -t <target> -r <host>`
15+
16+
For example, to intercept traffic between targets, use:
17+
18+
`arpspoof -i eth0 -t 192.168.4.11 -r 192.168.4.16`
19+
20+
# Nmap:
21+
22+
- nmap -sn 172.21.10.0/24
23+
- nmap -sn 172.21.10.1-253
24+
- nmap -sn 172.21.10.*
25+
26+
You can also grep out the IP addresses and cut out fluff:
27+
```
28+
nmap -sn 172.x.x.x/24 | grep "172" | cut -f 5 -d ' '
29+
```
30+
31+
A slower, more stealthier approach that utilizes the files containing the IP address split (as seen in the first section above) would be:
32+
```
33+
nmap --randomize-hosts -sn -T2 -oN nmap_discoveryScan_x.x.x.x-16.txt -iL x.x.x.x_IP_range.split.txt
34+
```
35+
This will export the results into a text file (`-oN`). Randomized hosts is optional, depending on the customer and the testing situation. The flag, `-oA`, can be used in place of `-oX` or `-oN`, as `-oA` will output the results to all output formats.
36+
37+
The results for both command options shown above will be the list of hosts that responded to the ping, thus are up and alive.
38+
39+
# Nbtscan:
40+
- nbtscan -r 172.21.1.0/24
41+
42+
# Masscan
43+
- masscan 172.21.10.0/24 --ping
44+
45+
# Ping Sweeps
46+
47+
## Linux Ping Sweep (Bash)
48+
49+
- for i in {1..254} ;do (ping -c 1 172.21.10.$i | grep "bytes from" &) ;done
50+
51+
## Windows Ping Sweep (Run on Windows System)
52+
53+
- for /L %i in (1,1,255) do @ping -n 1 -w 200 172.21.10.%i > nul && echo 172.21.1.%i is up.
54+
55+
## Powershell Ping Sweep:
56+
Note: This command can also run on powershell for Linux
57+
58+
- 1..20 | % {"172.21.10.$($_): $(Test-Connection -count 1 -comp 172.21.10.$($_) -quiet)"}
59+
- Get-PingSweep Subnet 172.21.10
60+
```
61+
# Reference: https://gist.github.com/joegasper/93ff8ae44fa8712747d85aa92c2b4c78
62+
function ResolveIp($IpAddress) {
63+
try {
64+
(Resolve-DnsName $IpAddress -QuickTimeout -ErrorAction SilentlyContinue).NameHost
65+
} catch {
66+
$null
67+
}
68+
}
69+
70+
function Invoke-PingSweep {
71+
[CmdletBinding()]
72+
Param(
73+
[Parameter(Mandatory=$true)]
74+
[string]$SubNet,
75+
[switch]$ResolveName
76+
)
77+
$ips = 1..254 | ForEach-Object {"$($SubNet).$_"}
78+
$ps = foreach ($ip in $ips) {
79+
(New-Object Net.NetworkInformation.Ping).SendPingAsync($ip, 250)
80+
#[Net.NetworkInformation.Ping]::New().SendPingAsync($ip, 250) # or if on PowerShell v5
81+
}
82+
[Threading.Tasks.Task]::WaitAll($ps)
83+
$ps.Result | Where-Object -FilterScript {$_.Status -eq 'Success' -and $_.Address -like "$subnet*"}
84+
Select-Object Address,Status,RoundtripTime -Unique |
85+
ForEach-Object {
86+
if ($_.Status -eq 'Success') {
87+
if (!$ResolveName) {
88+
$_
89+
} else {
90+
$_ | Select-Object Address, @{Expression={ResolveIp($_.Address)};Label='Name'}, Status, RoundtripTime
91+
}
92+
}
93+
}
94+
}
95+
```
96+
97+
## Python Ping Sweep:
98+
99+
The following python script can be used to perform a ping scan.
100+
```
101+
#!/usr/bin/env python3
102+
import ipaddress
103+
from subprocess import Popen, DEVNULL
104+
105+
for ping in range(1, 254):
106+
address = "x.x.x.%d" % ping
107+
response = Popen(["ping", "-c1", address], stdout=DEVNULL)
108+
output = response.communicate()[0]
109+
val1 = response.returncode
110+
if val1 == 0:
111+
print(address)
112+
```
113+
This script is specifically used for a /24 network. Modification required for other network types.
114+
115+
# 802.lQ Cisco Dynamic Trunking Protocol (DTP)
116+
117+
## Dtpscan
118+
119+
Source: https://github.com/commonexploits/dtpscan
120+
121+
DTPscan will passively sniff the network and detect which switchport mode the switch is configured in to assist with VLAN hopping attacks.**
122+
123+
`./dtpscan.sh`
124+
125+
## Yersinia
126+
127+
In Kali: sudo apt install yersinia
128+
129+
Running yersinia:
130+
131+
```
132+
$ sudo yersinia -h
133+
134+
Usage: yersinia [-hVGIDd] [-l logfile] [-c conffile] protocol [protocol_options]
135+
-V Program version.
136+
-h This help screen.
137+
-G Graphical mode (GTK).
138+
-I Interactive mode (ncurses).
139+
-D Daemon mode.
140+
-d Debug.
141+
-l logfile Select logfile.
142+
-c conffile Select config file.
143+
protocol One of the following: cdp, dhcp, dot1q, dot1x, dtp, hsrp, isl, mpls, stp, vtp.
144+
145+
Try 'yersinia protocol -h' to see protocol_options help
146+
147+
Please, see the man page for a full list of options and many examples.
148+
Send your bugs & suggestions to the Yersinia developers <[email protected]>
149+
150+
MOTD: M4t30 31337 M4t30 31337 M4t30 31337 M4t30 31337 M4t30 31337
151+
152+
```
153+
154+
Once a VLAN has been identified, a virtual interface can be configured within Kali Linux:
155+
156+
```
157+
modprobe 8021q
158+
vconfig add <interface> <vlan_number>
159+
dhclient <interface>.<vlan_number>
160+
```
161+
162+
Verifying our
163+
To check this is configured correctly the `ifconfig <interface>.<vlan_number>` or `ip a` commands can be ran.
164+
165+
Reference: https://www.blackhat.com/presentations/bh-europe-05/BH_EU_05-Berrueta_Andres/BH_EU_05_Berrueta_Andres.pdf
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#recon #scanning-enumeration
2+
## Scanning targets
3+
- masscan 172.21.10.0
4+
- masscan 172.21.10.0/24 172.21.0.0/16
5+
- masscan 172.21.10.0/24 --excludeFile <File>
6+
- masscan 172.21.10.0/24 --exclude 172.21.10.254
7+
8+
## Scanning for services:
9+
- masscan 172.21.10.1 -p 80
10+
- masscan 172.21.10.1 -p 0-65535
11+
- masscan 172.21.10.1 -p 80,443
12+
- masscan 172.21.10.0/24 -p 0-65535 --rate 1000000 --open-only --http-user-agent \
13+
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36\
14+
-oL "output.txt"
15+
# UDP Scan
16+
- masscan 172.21.10.1 -pU 53
17+
18+
## Report only open ports
19+
masscan 10.0.0.1 --open-only
20+
21+
# Other Options
22+
## Offline Mode (Reviews how fast the program runs without the transmit overhead)
23+
- masscan 0.0.0.0/24 --offline
24+
25+
## Obtaining Service banners:
26+
- masscan 172.21.10.1 --banners
27+
28+
## Set masscan to use a source ip
29+
masscan 10.0.0.1 --source-ip 192.168.1.200
30+
31+
## Change the default user agent
32+
masscan 10.0.0.1 --http-user-agent <user-agent>
33+
34+
## Save sent packet in PCAP
35+
masscan 10.0.0.1 --pcap <filename>
36+
37+
# References:
38+
39+
- https://github.com/robertdavidgraham/masscan
40+
- https://danielmiessler.com/study/masscan/
41+

0 commit comments

Comments
 (0)