hacktricks/crypto-and-stego/stego-tricks.md

233 lines
11 KiB
Markdown
Raw Normal View History

2024-04-06 19:39:38 +00:00
# Mbinu za Stego
{% hint style="success" %}
Jifunze na zoezi la AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**Mafunzo ya HackTricks ya Mtaalam wa Timu Nyekundu ya AWS (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Jifunze na zoezi la GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**Mafunzo ya HackTricks ya Mtaalam wa Timu Nyekundu ya GCP (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2024-04-06 19:39:38 +00:00
<details>
2024-04-06 19:39:38 +00:00
<summary>unga mkono HackTricks</summary>
2024-04-06 19:39:38 +00:00
* Angalia [**mpango wa michango**](https://github.com/sponsors/carlospolop)!
* **Jiunge na** 💬 [**kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Shiriki mbinu za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
2024-04-06 19:39:38 +00:00
</details>
{% endhint %}
2024-04-06 19:39:38 +00:00
**Kikundi cha Usalama cha Try Hard**
<figure><img src="/.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
{% embed url="https://discord.gg/tryhardsecurity" %}
***
## **Kuchambua Data kutoka kwa Faili**
2024-04-06 19:39:38 +00:00
### **Binwalk**
Zana ya kutafuta faili za binary kwa faili zilizofichwa na data. Inasakinishwa kupitia `apt` na chanzo chake kinapatikana kwenye [GitHub](https://github.com/ReFirmLabs/binwalk).
2024-04-06 19:39:38 +00:00
```bash
binwalk file # Displays the embedded data
binwalk -e file # Extracts the data
binwalk --dd ".*" file # Extracts all data
```
### **Kwanza kabisa**
Inapata faili kulingana na vichwa vyao na miguu, inayofaa kwa picha za png. Imewekwa kupitia `apt` na chanzo chake kwenye [GitHub](https://github.com/korczis/foremost).
2024-04-06 19:39:38 +00:00
```bash
foremost -i file # Extracts data
```
### **Exiftool**
Inasaidia kuangalia metadata ya faili, inapatikana [hapa](https://www.sno.phy.queensu.ca/~phil/exiftool/).
2024-04-06 19:39:38 +00:00
```bash
exiftool file # Shows the metadata
```
### **Exiv2**
Sawa na exiftool, kwa kuangalia metadata. Inaweza kusakinishwa kupitia `apt`, chanzo kiko kwenye [GitHub](https://github.com/Exiv2/exiv2), na ina tovuti rasmi kwenye [website](http://www.exiv2.org/).
2024-04-06 19:39:38 +00:00
```bash
exiv2 file # Shows the metadata
```
### **Faili**
Tambua aina ya faili unayoshughulika nayo.
### **Maneno**
Chambua maneno yanayoweza kusomwa kutoka kwenye faili, ukitumia mipangilio mbalimbali ya uendeshaji ili kuchuja matokeo.
```bash
strings -n 6 file # Extracts strings with a minimum length of 6
strings -n 6 file | head -n 20 # First 20 strings
strings -n 6 file | tail -n 20 # Last 20 strings
strings -e s -n 6 file # 7bit strings
strings -e S -n 6 file # 8bit strings
strings -e l -n 6 file # 16bit strings (little-endian)
strings -e b -n 6 file # 16bit strings (big-endian)
strings -e L -n 6 file # 32bit strings (little-endian)
strings -e B -n 6 file # 32bit strings (big-endian)
```
### **Kulinganisha (cmp)**
2024-04-06 19:39:38 +00:00
Inatumika kulinganisha faili iliyobadilishwa na toleo lake la asili lililopatikana mtandaoni.
```bash
cmp original.jpg stego.jpg -b -l
```
## **Kuondoa Data Iliyofichwa kwenye Matini**
2024-04-06 19:39:38 +00:00
### **Data Iliyofichwa kwenye Nafasi**
Vipengele visivyoonekana kwenye nafasi zisizo na maudhui yanaweza kuficha taarifa. Ili kuondoa data hii, tembelea [https://www.irongeek.com/i.php?page=security/unicode-steganography-homoglyph-encoder](https://www.irongeek.com/i.php?page=security/unicode-steganography-homoglyph-encoder).
2024-04-06 19:39:38 +00:00
## **Kuondoa Data kutoka kwenye Picha**
2024-04-06 19:39:38 +00:00
### **Kutambua Maelezo ya Picha kwa Kutumia GraphicMagick**
[GraphicMagick](https://imagemagick.org/script/download.php) inatumika kutambua aina za faili za picha na kutambua uharibifu wa picha. Tekeleza amri ifuatayo kuangalia picha:
2024-04-06 19:39:38 +00:00
```bash
./magick identify -verbose stego.jpg
```
Kujaribu kurekebisha picha iliyoharibika, kuongeza maoni ya metadata inaweza kusaidia:
2024-04-06 19:39:38 +00:00
```bash
./magick mogrify -set comment 'Extraneous bytes removed' stego.jpg
```
### **Steghide kwa Kuficha Data**
Steghide inarahisisha kuficha data ndani ya faili za `JPEG, BMP, WAV, na AU`, inayoweza kuingiza na kutoa data iliyofichwa kwa njia ya kielelezo. Usakinishaji ni wa moja kwa moja kwa kutumia `apt`, na [micho yake ya chanzo inapatikana kwenye GitHub](https://github.com/StefanoDeVuono/steghide).
2024-04-06 19:39:38 +00:00
**Amri:**
* `steghide info file` inaonyesha ikiwa faili ina data iliyofichwa.
* `steghide extract -sf file [--passphrase password]` inatoa data iliyofichwa, nenosiri ni hiari.
Kwa uchimbaji wa wavuti, tembelea [tovuti hii](https://futureboy.us/stegano/decinput.html).
**Shambulio la Kuforce la Stegcracker:**
* Ili kujaribu kuvunja nenosiri kwenye Steghide, tumia [stegcracker](https://github.com/Paradoxis/StegCracker.git) kama ifuatavyo:
2024-04-06 19:39:38 +00:00
```bash
stegcracker <file> [<wordlist>]
```
### **zsteg kwa Faili za PNG na BMP**
zsteg inajitolea katika kufunua data iliyofichwa katika faili za PNG na BMP. Usanidi unafanywa kupitia `gem install zsteg`, na chanzo chake kiko kwenye [GitHub](https://github.com/zed-0xff/zsteg).
2024-04-06 19:39:38 +00:00
**Amri:**
* `zsteg -a faili` inatumia njia zote za ugunduzi kwenye faili.
* `zsteg -E faili` inabainisha mzigo wa data kwa uchimbaji.
2024-04-06 19:39:38 +00:00
### **StegoVeritas na Stegsolve**
**stegoVeritas** huchunguza metadata, hufanya mabadiliko ya picha, na kutumia nguvu ya LSB miongoni mwa sifa zingine. Tumia `stegoveritas.py -h` kwa orodha kamili ya chaguo na `stegoveritas.py stego.jpg` kutekeleza uchunguzi wote.
2024-04-06 19:39:38 +00:00
**Stegsolve** inatumia vichujio vya rangi mbalimbali kufunua maandishi au ujumbe uliofichwa ndani ya picha. Inapatikana kwenye [GitHub](https://github.com/eugenekolo/sec-tools/tree/master/stego/stegsolve/stegsolve).
### **FFT kwa Ugunduzi wa Yaliyofichwa**
Mbinu za Fast Fourier Transform (FFT) zinaweza kufunua yaliyofichwa katika picha. Vyanzo muhimu ni pamoja na:
2024-04-06 19:39:38 +00:00
* [Demos ya EPFL](http://bigwww.epfl.ch/demo/ip/demos/FFT/)
2024-04-06 19:39:38 +00:00
* [Ejectamenta](https://www.ejectamenta.com/Fourifier-fullscreen/)
* [FFTStegPic kwenye GitHub](https://github.com/0xcomposure/FFTStegPic)
### **Stegpy kwa Faili za Sauti na Picha**
Stegpy inaruhusu kuingiza habari kwenye faili za picha na sauti, ikisaidia muundo kama PNG, BMP, GIF, WebP, na WAV. Inapatikana kwenye [GitHub](https://github.com/dhsdshdhk/stegpy).
### **Pngcheck kwa Uchambuzi wa Faili za PNG**
Kufanya uchambuzi wa faili za PNG au kuthibitisha uhalali wao, tumia:
2024-04-06 19:39:38 +00:00
```bash
apt-get install pngcheck
pngcheck stego.png
```
### **Zana Zaidi kwa Uchambuzi wa Picha**
Kwa uchunguzi zaidi, tafadhali tembelea:
2024-04-06 19:39:38 +00:00
* [Magic Eye Solver](http://magiceye.ecksdee.co.uk/)
* [Uchambuzi wa Kiwango cha Hitilafu ya Picha](https://29a.ch/sandbox/2012/imageerrorlevelanalysis/)
* [Outguess](https://github.com/resurrecting-open-source-projects/outguess)
* [OpenStego](https://www.openstego.com/)
* [DIIT](https://diit.sourceforge.net/)
## **Kuchambua Data kutoka kwenye Audios**
2024-04-06 19:39:38 +00:00
**Steganografia ya sauti** inatoa njia ya kipekee ya kuficha habari ndani ya faili za sauti. Zana tofauti hutumiwa kwa kuingiza au kupata maudhui yaliyofichwa.
### **Steghide (JPEG, BMP, WAV, AU)**
Steghide ni zana yenye uwezo wa kuficha data katika faili za JPEG, BMP, WAV, na AU. Maelekezo ya kina yanapatikana katika [hati ya mbinu za stego](stego-tricks.md#steghide).
### **Stegpy (PNG, BMP, GIF, WebP, WAV)**
Zana hii inaweza kutumika na aina mbalimbali za muundo ikiwa ni pamoja na PNG, BMP, GIF, WebP, na WAV. Kwa maelezo zaidi, tazama [sehemu ya Stegpy](stego-tricks.md#stegpy-png-bmp-gif-webp-wav).
2024-04-06 19:39:38 +00:00
### **ffmpeg**
ffmpeg ni muhimu kwa ajili ya kutathmini uadilifu wa faili za sauti, kutoa maelezo ya kina na kutambua tofauti yoyote.
2024-04-06 19:39:38 +00:00
```bash
ffmpeg -v info -i stego.mp3 -f null -
```
### **WavSteg (WAV)**
WavSteg inafanya vizuri katika kuficha na kutoa data ndani ya faili za WAV kwa kutumia mkakati wa biti isiyo muhimu zaidi. Inapatikana kwenye [GitHub](https://github.com/ragibson/Steganography#WavSteg). Amri zinajumuisha:
2024-04-06 19:39:38 +00:00
```bash
python3 WavSteg.py -r -b 1 -s soundfile -o outputfile
python3 WavSteg.py -r -b 2 -s soundfile -o outputfile
```
### **Deepsound**
Deepsound inaruhusu kusimbwa na kugunduliwa kwa habari ndani ya faili za sauti kwa kutumia AES-256. Inaweza kupakuliwa kutoka [ukurasa rasmi](http://jpinsoft.net/deepsound/download.aspx).
2024-04-06 19:39:38 +00:00
### **Sonic Visualizer**
Zana muhimu kwa uchunguzi wa kivisuali na kianalitiki wa faili za sauti, Sonic Visualizer inaweza kufunua vipengele vilivyofichwa visivyoweza kugunduliwa kwa njia nyingine. Tembelea [tovuti rasmi](https://www.sonicvisualiser.org/) kwa maelezo zaidi.
### **DTMF Tones - Dial Tones**
Kugundua sauti za DTMF katika faili za sauti kunaweza kufikiwa kupitia zana za mtandaoni kama [hii DTMF detector](https://unframework.github.io/dtmf-detect/) na [DialABC](http://dialabc.com/sound/detect/index.html).
2024-04-06 19:39:38 +00:00
## **Mbinu Nyingine**
### **Urefu wa Binary SQRT - Msimbo wa QR**
2024-04-06 19:39:38 +00:00
Data ya binary ambayo inapimwa kwa mraba wa nambari kamili inaweza kuwakilisha msimbo wa QR. Tumia kificho hiki kuangalia:
2024-04-06 19:39:38 +00:00
```python
import math
math.sqrt(2500) #50
```
### **Tafsiri ya Braille**
Kwa kutafsiri Braille, [Mwandishi wa Braille wa Branah](https://www.branah.com/braille-translator) ni rasilimali nzuri.
## **Vyanzo**
* [**https://0xrick.github.io/lists/stego/**](https://0xrick.github.io/lists/stego/)
* [**https://github.com/DominicBreuker/stego-toolkit**](https://github.com/DominicBreuker/stego-toolkit)
**Kikundi cha Usalama cha Try Hard**
<figure><img src="/.gitbook/assets/telegram-cloud-document-1-5159108904864449420.jpg" alt=""><figcaption></figcaption></figure>
{% embed url="https://discord.gg/tryhardsecurity" %}
{% hint style="success" %}
Jifunze & zoezi la Udukuzi wa AWS:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**Mafunzo ya HackTricks AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Jifunze & zoezi la Udukuzi wa GCP: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**Mafunzo ya HackTricks GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2024-04-06 19:39:38 +00:00
<details>
2024-04-06 19:39:38 +00:00
<summary>Support HackTricks</summary>
2024-04-06 19:39:38 +00:00
* Angalia [**mpango wa usajili**](https://github.com/sponsors/carlospolop)!
* **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au kikundi cha [**telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Shiriki mbinu za udukuzi kwa kuwasilisha PRs kwa** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
2024-04-06 19:39:38 +00:00
</details>
{% endhint %}