Sometimes there are services that are only accessible from inside the network. For example a MySQL server might not be accessible from the outside, for security reasons. It is also common to have different administration applications that is only accessible from inside the network/machine. Like a printer interface, or something like that. These services might be more vulnerable since they are not meant to be seen from the outside.
@@ -104,6 +103,7 @@ netstat -ano
```
Example output:
```
Proto Local address Remote address State User Inode PID/Program name
@@ -156,7 +156,6 @@ Just as in windows kernel exploits should be our last resource, since it might b
wmic qfe get Caption,Description,HotFixID,InstalledOn
```
### Python to Binary
If we have an exploit written in python but we don't have python installed on the victim-machine we can always transform it into a binary with pyinstaller. Good trick to know.
@@ -177,6 +176,16 @@ Yeah I know this ain't pretty, but it works. You can of course change the name S
cat schtask.txt | grep "SYSTEM\|Task To Run" | grep -B 1 SYSTEM
Services on windows are programs that run in the background. Without a GUI.
@@ -222,10 +231,9 @@ Now you can process them one by one with the cacls command.
cacls "C:\path\to\file.exe"
```
### Look for Weakness
What we are interested in is binaries that have been installed by the user. In the output you want to look for **BUILTIN\Users:(F)**. Or where your user/usergroup has **(F)** or **(C)** rights.
What we are interested in is binaries that have been installed by the user. In the output you want to look for **BUILTIN\Users:\(F\)**. Or where your user/usergroup has **\(F\)** or **\(C\)** rights.
Example:
@@ -281,7 +289,7 @@ wmic process list brief | find "winlogon"
So when you get the shell you can either type **migrate PID** or automate this so that meterpreter automatically migrates.
When the program is restarted it will execute the binary **program.exe**, which we of course control. We can do this in any directory that has a space in its name. Not only program files.