-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
153 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ description: It is used for sending e-mail. POP3 or IMAP are used for receiving | |
tags: | ||
refs: | ||
date: 2023-05-20 | ||
date: 2024-09-14 | ||
draft: false | ||
--- | ||
|
||
|
@@ -68,7 +68,13 @@ telnet <target-ip> 25 | |
|
||
Commands are not case sensitive. | ||
|
||
### EHLO - list all supported enhanced functions | ||
### HELO - Identify SMTP Server | ||
|
||
```sh | ||
helo example.com | ||
``` | ||
|
||
### EHLO - List all supported enhanced functions | ||
|
||
```sh | ||
ehlo example.com | ||
|
@@ -90,6 +96,19 @@ ehlo example.com | |
- **TURN** - swap client and server | ||
- **VRFY** - check if the user exists in the SMTP server | ||
|
||
### Auth Login | ||
|
||
The `AUTH LOGIN` command allows us to login. We need to input `username/password` in **Base64**. | ||
Here is the example: | ||
|
||
```bash | ||
AUTH LOGIN | ||
334 VXNlcm5hbWU6 # Base64-encoded "username:" | ||
dGVzdA== # Base64-encoded "test" | ||
334 UGFzc3dvcmQ6 # Base64-encoded "password:" | ||
cGFzc3dvcmQ= # Base64-encoded "password" | ||
``` | ||
|
||
### Messages | ||
|
||
```sh | ||
|
@@ -132,6 +151,9 @@ expn example.com | |
|
||
```sh | ||
swaks --to [email protected] --from local-user@<local-ip> --server mail.example.com --body "hello" | ||
|
||
# --attach: Attach a file | ||
swaks --to [email protected] --from local-user@<local-ip> --server mail.example.com --body "hello" --attach @evil.docx | ||
``` | ||
|
||
<br /> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 16 additions & 8 deletions
24
src/exploit/windows/technique/download-files-in-windows.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,31 @@ | ||
--- | ||
title: Download Files in Windows | ||
description: We can download files from websites in Windows from command line, like ‘wget’ command of Linux. | ||
description: We can download files from websites in Windows from command line. | ||
tags: | ||
- Windows | ||
refs: | ||
date: 2024-03-26 | ||
date: 2024-09-14 | ||
draft: false | ||
--- | ||
|
||
## Using Invoke-WebRequest | ||
### PowerShell | ||
|
||
We can use `Invoke-WebRequest` command | ||
|
||
```bash | ||
# In PowerShell | ||
```powershell | ||
wget https://example.com/hello.txt -o hello.txt | ||
# or | ||
Invoke-WebRequest -Uri https://example.com/hello.txt -Outfile .\hello.txt | ||
# or | ||
IWR -Uri https://example.com/hello.txt -Outfile .\hello.txt | ||
``` | ||
|
||
### Command Prompt | ||
|
||
We need to call `powershell` or `powershell.exe` command before actual command. | ||
|
||
# In CMD, we need to call `powershell` or `powershell.exe` command. | ||
```powershell | ||
powershell wget https://example.com/hello.txt -o hello.txt | ||
# or | ||
powershell Invoke-WebRequest -Uri https://example.com/hello.txt -Outfile .\hello.txt | ||
# or | ||
powershell IWR -Uri https://example.com/hello.txt -Outfile .\hello.txt | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters