text stringlengths 0 1.99k |
|---|
4) Scheduled Tasks |
You can execute remote programs with at and schtasks [5]. It works in the |
same situations where you could use psexec, and it also leaves a well known |
footprint [12]. |
5) GPO |
If all those protocols are disabled or blocked by the firewall, once you're |
Domain Admin, you can use GPO to give users a login script, install an msi, |
execute a scheduled task [13], or, like we'll see with the computer of |
Mauro Romeo (one of Hacking Team's sysadmins), use GPO to enable WMI and |
open the firewall. |
[1] https://technet.microsoft.com/en-us/sysinternals/psexec.aspx |
[2] https://sourceforge.net/projects/winexe/ |
[3] https://www.rapid7.com/db/modules/exploit/windows/smb/psexec_psh |
[4] http://www.powershellempire.com/?page_id=523 |
[5] http://blog.cobaltstrike.com/2014/04/30/lateral-movement-with-high-latency-cc/ |
[6] https://github.com/byt3bl33d3r/pth-toolkit |
[7] https://github.com/CoreSecurity/impacket/blob/master/examples/wmiexec.py |
[8] https://www.trustedsec.com/june-2015/no_psexec_needed/ |
[9] http://www.powershellempire.com/?page_id=124 |
[10] http://www.maquinasvirtuales.eu/ejecucion-remota-con-powershell/ |
[11] https://adsecurity.org/?p=2277 |
[12] https://www.secureworks.com/blog/where-you-at-indicators-of-lateral-movement-using-at-exe-on-windows-7-systems |
[13] https://github.com/PowerShellEmpire/Empire/blob/master/lib/modules/lateral_movement/new_gpo_immediate_task.py |
"In place" Movement: |
1) Token Stealing |
Once you have admin access on a computer, you can use the tokens of the |
other users to access resources in the domain. Two tools for doing this are |
incognito [1] and the mimikatz token::* commands [2]. |
2) MS14-068 |
You can take advantage of a validation bug in Kerberos to generate Domain |
Admin tickets [3][4][5]. |
3) Pass the Hash |
If you have a user's hash, but they're not logged in, you can use |
sekurlsa::pth [2] to get a ticket for the user. |
4) Process Injection |
Any RAT can inject itself into other processes. For example, the migrate |
command in meterpreter and pupy [6], or the psinject [7] command in |
powershell empire. You can inject into the process that has the token you |
want. |
5) runas |
This is sometimes very useful since it doesn't require admin privileges. |
The command is part of windows, but if you don't have a GUI you can use |
powershell [8]. |
[1] https://www.indetectables.net/viewtopic.php?p=211165 |
[2] https://adsecurity.org/?page_id=1821 |
[3] https://github.com/bidord/pykek |
[4] https://adsecurity.org/?p=676 |
[5] http://www.hackplayers.com/2014/12/CVE-2014-6324-como-validarse-con-cualquier-usuario-como-admin.html |
[6] https://github.com/n1nj4sec/pupy |
[7] http://www.powershellempire.com/?page_id=273 |
[8] https://github.com/FuzzySecurity/PowerShell-Suite/blob/master/Invoke-Runas.ps1 |
----[ 13.2 - Persistence ]------------------------------------------------------ |
Once you have access, you want to keep it. Really, persistence is only a |
challenge for assholes like Hacking Team who target activists and other |
individuals. To hack companies, persistence isn't needed since companies never |
sleep. I always use Duqu 2 style "persistence", executing in RAM on a couple |
high-uptime servers. On the off chance that they all reboot at the same time, |
I have passwords and a golden ticket [1] as backup access. You can read more |
about the different techniques for persistence in windows here [2][3][4]. But |
for hacking companies, it's not needed and it increases the risk of detection. |
[1] http://blog.cobaltstrike.com/2014/05/14/meterpreter-kiwi-extension-golden-ticket-howto/ |
[2] http://www.harmj0y.net/blog/empire/nothing-lasts-forever-persistence-with-empire/ |
[3] http://www.hexacorn.com/blog/category/autostart-persistence/ |
[4] https://blog.netspi.com/tag/persistence/ |
----[ 13.3 - Internal reconnaissance ]------------------------------------------ |
The best tool these days for understanding windows networks is Powerview [1]. |
It's worth reading everything written by it's author [2], especially [3], [4], |
[5], and [6]. Powershell itself is also quite powerful [7]. As there are still |
many windows 2000 and 2003 servers without powershell, you also have to learn |
the old school [8], with programs like netview.exe [9] or the windows builtin |
"net view". Other techniques that I like are: |
1) Downloading a list of file names |
With a Domain Admin account, you can download a list of all filenames in |
the network with powerview: |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.