mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
Translated ['src/generic-methodologies-and-resources/basic-forensic-meth
This commit is contained in:
parent
bba65759ea
commit
1789e04bd4
@ -41,6 +41,7 @@
|
||||
- [Anti-Forensic Techniques](generic-methodologies-and-resources/basic-forensic-methodology/anti-forensic-techniques.md)
|
||||
- [Docker Forensics](generic-methodologies-and-resources/basic-forensic-methodology/docker-forensics.md)
|
||||
- [Image Acquisition & Mount](generic-methodologies-and-resources/basic-forensic-methodology/image-acquisition-and-mount.md)
|
||||
- [Ios Backup Forensics](generic-methodologies-and-resources/basic-forensic-methodology/ios-backup-forensics.md)
|
||||
- [Linux Forensics](generic-methodologies-and-resources/basic-forensic-methodology/linux-forensics.md)
|
||||
- [Malware Analysis](generic-methodologies-and-resources/basic-forensic-methodology/malware-analysis.md)
|
||||
- [Memory dump analysis](generic-methodologies-and-resources/basic-forensic-methodology/memory-dump-analysis/README.md)
|
||||
@ -61,6 +62,7 @@
|
||||
- [Office file analysis](generic-methodologies-and-resources/basic-forensic-methodology/specific-software-file-type-tricks/office-file-analysis.md)
|
||||
- [PDF File analysis](generic-methodologies-and-resources/basic-forensic-methodology/specific-software-file-type-tricks/pdf-file-analysis.md)
|
||||
- [PNG tricks](generic-methodologies-and-resources/basic-forensic-methodology/specific-software-file-type-tricks/png-tricks.md)
|
||||
- [Structural File Format Exploit Detection](generic-methodologies-and-resources/basic-forensic-methodology/specific-software-file-type-tricks/structural-file-format-exploit-detection.md)
|
||||
- [Video and Audio file analysis](generic-methodologies-and-resources/basic-forensic-methodology/specific-software-file-type-tricks/video-and-audio-file-analysis.md)
|
||||
- [ZIPs tricks](generic-methodologies-and-resources/basic-forensic-methodology/specific-software-file-type-tricks/zips-tricks.md)
|
||||
- [Windows Artifacts](generic-methodologies-and-resources/basic-forensic-methodology/windows-forensics/README.md)
|
||||
|
@ -1,4 +1,4 @@
|
||||
# बेसिक फॉरेंसिक मेथोडोलॉजी
|
||||
# बेसिक फॉरेंसिक कार्यप्रणाली
|
||||
|
||||
{{#include ../../banners/hacktricks-training.md}}
|
||||
|
||||
@ -9,9 +9,9 @@
|
||||
../../generic-methodologies-and-resources/basic-forensic-methodology/image-acquisition-and-mount.md
|
||||
{{#endref}}
|
||||
|
||||
## मैलवेयर विश्लेषण
|
||||
## Malware Analysis
|
||||
|
||||
यह **छवि प्राप्त करने के बाद करने के लिए पहला कदम जरूरी नहीं है**। लेकिन आप इस मैलवेयर विश्लेषण तकनीकों का स्वतंत्र रूप से उपयोग कर सकते हैं यदि आपके पास एक फ़ाइल, फ़ाइल-प्रणाली छवि, मेमोरी छवि, pcap... है, इसलिए यह **इन क्रियाओं को ध्यान में रखना अच्छा है**:
|
||||
यह **जरूरी नहीं कि यह इमेज मिलने के बाद करने वाला पहला कदम हो**। लेकिन आप इन malware analysis techniques को स्वतंत्र रूप से उपयोग कर सकते हैं अगर आपके पास कोई file, file-system image, memory image, pcap... हो, इसलिए इन क्रियाओं को **ध्यान में रखना** अच्छा है:
|
||||
|
||||
|
||||
{{#ref}}
|
||||
@ -20,14 +20,41 @@ malware-analysis.md
|
||||
|
||||
## इमेज का निरीक्षण
|
||||
|
||||
यदि आपको एक **फॉरेंसिक इमेज** दी गई है, तो आप **पार्टीशनों, फ़ाइल-प्रणाली** का विश्लेषण करना शुरू कर सकते हैं और संभावित **दिलचस्प फ़ाइलों** (यहां तक कि हटाई गई) को **पुनर्प्राप्त** कर सकते हैं। जानें कैसे:
|
||||
यदि आपको किसी डिवाइस की **forensic image** दी गई है तो आप उपयोग किए गए **partitions, file-system** का विश्लेषण शुरू कर सकते हैं और संभावित रूप से **interesting files** (यहाँ तक कि deleted ones) को **recover** कर सकते हैं। यह सीखें:
|
||||
|
||||
|
||||
{{#ref}}
|
||||
partitions-file-systems-carving/
|
||||
{{#endref}}# बेसिक फॉरेंसिक कार्यप्रणाली
|
||||
|
||||
|
||||
|
||||
## इमेज बनाना और माउंट करना
|
||||
|
||||
|
||||
{{#ref}}
|
||||
../../generic-methodologies-and-resources/basic-forensic-methodology/image-acquisition-and-mount.md
|
||||
{{#endref}}
|
||||
|
||||
## Malware Analysis
|
||||
|
||||
यह **जरूरी नहीं कि यह इमेज मिलने के बाद करने वाला पहला कदम हो**। लेकिन आप इन malware analysis techniques को स्वतंत्र रूप से उपयोग कर सकते हैं अगर आपके पास कोई file, file-system image, memory image, pcap... हो, इसलिए इन क्रियाओं को **ध्यान में रखना** अच्छा है:
|
||||
|
||||
|
||||
{{#ref}}
|
||||
malware-analysis.md
|
||||
{{#endref}}
|
||||
|
||||
## इमेज का निरीक्षण
|
||||
|
||||
यदि आपको किसी डिवाइस की **forensic image** दी गई है तो आप उपयोग किए गए **partitions, file-system** का विश्लेषण शुरू कर सकते हैं और संभावित रूप से **interesting files** (यहाँ तक कि deleted ones) को **recover** कर सकते हैं। यह सीखें:
|
||||
|
||||
|
||||
{{#ref}}
|
||||
partitions-file-systems-carving/
|
||||
{{#endref}}
|
||||
|
||||
उपयोग किए गए OSs और यहां तक कि प्लेटफ़ॉर्म के आधार पर विभिन्न दिलचस्प कलाकृतियों की खोज की जानी चाहिए:
|
||||
उपयोग किए गए OSs और प्लेटफ़ॉर्म के अनुसार अलग-अलग रोचक artifacts खोजे जाने चाहिए:
|
||||
|
||||
|
||||
{{#ref}}
|
||||
@ -44,47 +71,101 @@ linux-forensics.md
|
||||
docker-forensics.md
|
||||
{{#endref}}
|
||||
|
||||
## विशिष्ट फ़ाइल-प्रकारों और सॉफ़्टवेयर की गहरी जांच
|
||||
|
||||
यदि आपके पास बहुत **संदिग्ध** **फ़ाइल** है, तो **फ़ाइल-प्रकार और सॉफ़्टवेयर** के आधार पर जो इसे बनाया है, कई **तरकीबें** उपयोगी हो सकती हैं।\
|
||||
कुछ दिलचस्प तरकीबें जानने के लिए निम्नलिखित पृष्ठ पढ़ें:
|
||||
{{#ref}}
|
||||
ios-backup-forensics.md
|
||||
{{#endref}}
|
||||
|
||||
## विशिष्ट फाइल-प्रकार और सॉफ़्टवेयर का गहरा निरीक्षण
|
||||
|
||||
यदि आपके पास बहुत ही **suspicious** **file** है, तो इसे बनाने वाले **file-type और software** के आधार पर कई **tricks** उपयोगी हो सकते हैं।\
|
||||
कुछ रोचक tricks सीखने के लिए निम्न पृष्ठ पढ़ें:
|
||||
|
||||
|
||||
{{#ref}}
|
||||
specific-software-file-type-tricks/
|
||||
{{#endref}}
|
||||
|
||||
मैं पृष्ठ का विशेष उल्लेख करना चाहता हूं:
|
||||
मैं विशेष रूप से इस पृष्ठ का उल्लेख करना चाहूँगा:
|
||||
|
||||
|
||||
{{#ref}}
|
||||
specific-software-file-type-tricks/browser-artifacts.md
|
||||
{{#endref}}
|
||||
|
||||
## मेमोरी डंप निरीक्षण
|
||||
## Memory Dump Inspection
|
||||
|
||||
|
||||
{{#ref}}
|
||||
memory-dump-analysis/
|
||||
{{#endref}}
|
||||
|
||||
## Pcap निरीक्षण
|
||||
## Pcap Inspection
|
||||
|
||||
|
||||
{{#ref}}
|
||||
pcap-inspection/
|
||||
{{#endref}}
|
||||
|
||||
## **एंटी-फॉरेंसिक तकनीकें**
|
||||
## **Anti-Forensic Techniques**
|
||||
|
||||
एंटी-फॉरेंसिक तकनीकों के संभावित उपयोग को ध्यान में रखें:
|
||||
anti-forensic techniques के संभावित उपयोग को ध्यान में रखें:
|
||||
|
||||
|
||||
{{#ref}}
|
||||
anti-forensic-techniques.md
|
||||
{{#endref}}
|
||||
|
||||
## खतरे की खोज
|
||||
## Threat Hunting
|
||||
|
||||
|
||||
{{#ref}}
|
||||
file-integrity-monitoring.md
|
||||
{{#endref}}
|
||||
|
||||
|
||||
|
||||
## विशिष्ट फाइल-प्रकार और सॉफ़्टवेयर का गहरा निरीक्षण
|
||||
|
||||
यदि आपके पास बहुत ही **suspicious** **file** है, तो इसे बनाने वाले **file-type और software** के आधार पर कई **tricks** उपयोगी हो सकते हैं।\
|
||||
कुछ रोचक tricks सीखने के लिए निम्न पृष्ठ पढ़ें:
|
||||
|
||||
|
||||
{{#ref}}
|
||||
specific-software-file-type-tricks/
|
||||
{{#endref}}
|
||||
|
||||
मैं विशेष रूप से इस पृष्ठ का उल्लेख करना चाहूँगा:
|
||||
|
||||
|
||||
{{#ref}}
|
||||
specific-software-file-type-tricks/browser-artifacts.md
|
||||
{{#endref}}
|
||||
|
||||
## Memory Dump Inspection
|
||||
|
||||
|
||||
{{#ref}}
|
||||
memory-dump-analysis/
|
||||
{{#endref}}
|
||||
|
||||
## Pcap Inspection
|
||||
|
||||
|
||||
{{#ref}}
|
||||
pcap-inspection/
|
||||
{{#endref}}
|
||||
|
||||
## **Anti-Forensic Techniques**
|
||||
|
||||
anti-forensic techniques के संभावित उपयोग को ध्यान में रखें:
|
||||
|
||||
|
||||
{{#ref}}
|
||||
anti-forensic-techniques.md
|
||||
{{#endref}}
|
||||
|
||||
## Threat Hunting
|
||||
|
||||
|
||||
{{#ref}}
|
||||
|
@ -0,0 +1,124 @@
|
||||
# iOS Backup Forensics (Messaging‑केंद्रित प्राथमिक जाँच)
|
||||
|
||||
{{#include ../../banners/hacktricks-training.md}}
|
||||
|
||||
यह पेज messaging app अटैचमेंट्स के माध्यम से 0‑click exploit delivery के संकेतों के लिए iOS बैकअप को पुनर्निर्माण और विश्लेषण करने के व्यावहारिक कदम बताता है। यह Apple के hashed backup layout को मानव‑पठनीय पथों में बदलने पर केंद्रित है, और फिर सामान्य ऐप्स में attachments की सूची बनाकर और स्कैन करके उनका विश्लेषण करता है।
|
||||
|
||||
Goals:
|
||||
- Manifest.db से पठनीय पथ पुनर्निर्माण करें
|
||||
- 메시जिंग डेटाबेस (iMessage, WhatsApp, Signal, Telegram, Viber) को सूचीबद्ध करें
|
||||
- अटैचमेंट पथ हल करें, embedded objects (PDF/Images/Fonts) निकालें, और उन्हें structural detectors को फ़ीड करें
|
||||
|
||||
|
||||
## iOS बैकअप का पुनर्निर्माण
|
||||
|
||||
MobileSync के अंतर्गत स्टोर किए गए बैकअप hashed filenames का उपयोग करते हैं जो मानव‑पठनीय नहीं होते। The Manifest.db SQLite database हर स्टोर किए गए ऑब्जेक्ट को उसके logical path से मैप करता है।
|
||||
|
||||
High‑level procedure:
|
||||
1) Manifest.db खोलें और file records पढ़ें (domain, relativePath, flags, fileID/hash)
|
||||
2) domain + relativePath के आधार पर मूल फ़ोल्डर हायरार्की पुनःनिर्मित करें
|
||||
3) प्रत्येक स्टोर किए गए ऑब्जेक्ट को उसके reconstructed path पर copy या hardlink करें
|
||||
|
||||
Example workflow with a tool that implements this end‑to‑end (ElegantBouncer):
|
||||
```bash
|
||||
# Rebuild the backup into a readable folder tree
|
||||
$ elegant-bouncer --ios-extract /path/to/backup --output /tmp/reconstructed
|
||||
[+] Reading Manifest.db ...
|
||||
✓ iOS backup extraction completed successfully!
|
||||
```
|
||||
नोट:
|
||||
- एन्क्रिप्टेड बैकअप को संभालें — अपने extractor को बैकअप पासवर्ड प्रदान करके
|
||||
- जहाँ संभव हो, साक्ष्य के मूल्य के लिए मूल timestamps/ACLs बनाए रखें
|
||||
|
||||
|
||||
## मैसेजिंग ऐप अटैचमेंट सूचीकरण
|
||||
|
||||
पुनर्निर्माण के बाद, लोकप्रिय ऐप्स के लिए अटैचमेंट्स की सूची बनाएं। सटीक schema ऐप/वर्ज़न के अनुसार भिन्न होता है, लेकिन तरीका समान है: messaging database को query करें, messages को attachments से join करें, और डिस्क पर paths को resolve करें।
|
||||
|
||||
### iMessage (sms.db)
|
||||
मुख्य टेबल्स: message, attachment, message_attachment_join (MAJ), chat, chat_message_join (CMJ)
|
||||
|
||||
उदाहरण क्वेरी:
|
||||
```sql
|
||||
-- List attachments with basic message linkage
|
||||
SELECT
|
||||
m.ROWID AS message_rowid,
|
||||
a.ROWID AS attachment_rowid,
|
||||
a.filename AS attachment_path,
|
||||
m.handle_id,
|
||||
m.date,
|
||||
m.is_from_me
|
||||
FROM message m
|
||||
JOIN message_attachment_join maj ON maj.message_id = m.ROWID
|
||||
JOIN attachment a ON a.ROWID = maj.attachment_id
|
||||
ORDER BY m.date DESC;
|
||||
|
||||
-- Include chat names via chat_message_join
|
||||
SELECT
|
||||
c.display_name,
|
||||
a.filename AS attachment_path,
|
||||
m.date
|
||||
FROM chat c
|
||||
JOIN chat_message_join cmj ON cmj.chat_id = c.ROWID
|
||||
JOIN message m ON m.ROWID = cmj.message_id
|
||||
JOIN message_attachment_join maj ON maj.message_id = m.ROWID
|
||||
JOIN attachment a ON a.ROWID = maj.attachment_id
|
||||
ORDER BY m.date DESC;
|
||||
```
|
||||
संलग्नक पथ Library/SMS/Attachments/ के अंतर्गत पुनर्निर्मित पेड़ के सापेक्ष (relative) या पूर्ण-पथ (absolute) हो सकते हैं।
|
||||
|
||||
### WhatsApp (ChatStorage.sqlite)
|
||||
सामान्य संबंध: message table ↔ media/attachment table (नामकरण संस्करण के अनुसार भिन्न हो सकता है). ऑन‑डिस्क पाथ प्राप्त करने के लिए media पंक्तियों को query करें।
|
||||
|
||||
उदाहरण (सामान्य):
|
||||
```sql
|
||||
SELECT
|
||||
m.Z_PK AS message_pk,
|
||||
mi.ZMEDIALOCALPATH AS media_path,
|
||||
m.ZMESSAGEDATE AS message_date
|
||||
FROM ZWAMESSAGE m
|
||||
LEFT JOIN ZWAMEDIAITEM mi ON mi.ZMESSAGE = m.Z_PK
|
||||
WHERE mi.ZMEDIALOCALPATH IS NOT NULL
|
||||
ORDER BY m.ZMESSAGEDATE DESC;
|
||||
```
|
||||
Adjust table/column names to your app version (ZWAMESSAGE/ZWAMEDIAITEM are common in iOS builds).
|
||||
|
||||
### Signal / Telegram / Viber
|
||||
- Signal: the message DB is encrypted; however, attachments cached on disk (and thumbnails) are usually scan‑able
|
||||
- Telegram: inspect cache directories (photo/video/document caches) and map to chats when possible
|
||||
- Viber: Viber.sqlite contains message/attachment tables with on‑disk references
|
||||
|
||||
Tip: even when metadata is encrypted, scanning the media/cache directories still surfaces malicious objects.
|
||||
|
||||
|
||||
## Scanning attachments for structural exploits
|
||||
|
||||
Once you have attachment paths, feed them into structural detectors that validate file‑format invariants instead of signatures. Example with ElegantBouncer:
|
||||
```bash
|
||||
# Recursively scan only messaging attachments under the reconstructed tree
|
||||
$ elegant-bouncer --scan --messaging /tmp/reconstructed
|
||||
[+] Found N messaging app attachments to scan
|
||||
✗ THREAT in WhatsApp chat 'John Doe': suspicious_document.pdf → FORCEDENTRY (JBIG2)
|
||||
✗ THREAT in iMessage: photo.webp → BLASTPASS (VP8L)
|
||||
```
|
||||
स्ट्रक्चरल नियमों द्वारा कवर किए जाने वाले detections में शामिल हैं:
|
||||
- PDF/JBIG2 FORCEDENTRY (CVE‑2021‑30860): JBIG2 शब्दकोश की असंभव स्थितियाँ
|
||||
- WebP/VP8L BLASTPASS (CVE‑2023‑4863): अत्यधिक बड़े Huffman तालिका निर्माण
|
||||
- TrueType TRIANGULATION (CVE‑2023‑41990): अप्रलेखित bytecode opcodes
|
||||
- DNG/TIFF CVE‑2025‑43300: metadata और stream component के बीच असंगतियाँ
|
||||
|
||||
|
||||
## मान्यता, सावधानियाँ और false positives
|
||||
|
||||
- Time conversions: कुछ संस्करणों में iMessage तिथियों को Apple epochs/units में स्टोर करता है; रिपोर्टिंग के दौरान उचित रूप से रूपांतरित करें
|
||||
- Schema drift: ऐप के SQLite schemas समय के साथ बदलते हैं; device build के अनुसार table/column नामों की पुष्टि करें
|
||||
- Recursive extraction: PDFs अंदर JBIG2 streams और fonts embed कर सकते हैं; अंदरूनी objects को extract करके scan करें
|
||||
- False positives: structural heuristics रूढ़िवादी होते हैं लेकिन दुर्लभ malformed पर भी flag कर सकते हैं जो benign media हैं
|
||||
|
||||
|
||||
## References
|
||||
|
||||
- [ELEGANTBOUNCER: When You Can't Get the Samples but Still Need to Catch the Threat](https://www.msuiche.com/posts/elegantbouncer-when-you-cant-get-the-samples-but-still-need-to-catch-the-threat/)
|
||||
- [ElegantBouncer project (GitHub)](https://github.com/msuiche/elegant-bouncer)
|
||||
|
||||
{{#include ../../banners/hacktricks-training.md}}
|
@ -1,8 +1,8 @@
|
||||
# विशिष्ट सॉफ़्टवेयर/फाइल प्रकार के ट्रिक्स
|
||||
# विशिष्ट सॉफ़्टवेयर/फ़ाइल प्रकार युक्तियाँ
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
यहाँ आप विशिष्ट फाइल-प्रकारों और/या सॉफ़्टवेयर के लिए दिलचस्प ट्रिक्स पा सकते हैं:
|
||||
यहाँ आप विशिष्ट फ़ाइल-प्रकार और/या सॉफ़्टवेयर के लिए रोचक ट्रिक्स पा सकते हैं:
|
||||
|
||||
|
||||
{{#ref}}
|
||||
@ -35,6 +35,11 @@ pdf-file-analysis.md
|
||||
{{#endref}}
|
||||
|
||||
|
||||
{{#ref}}
|
||||
structural-file-format-exploit-detection.md
|
||||
{{#endref}}
|
||||
|
||||
|
||||
{{#ref}}
|
||||
png-tricks.md
|
||||
{{#endref}}
|
||||
|
@ -0,0 +1,173 @@
|
||||
# Structural File‑Format Exploit Detection (0‑Click Chains)
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
यह पृष्ठ व्यवहारिक तकनीकों का सारांश देता है जो 0‑click mobile exploit फाइलों का पता लगाने के लिए उनके फॉर्मैट की संरचनात्मक इनवेरिएंट्स को वैलिडेट करती हैं बजाय कि byte signatures पर निर्भर रहने के। यह तरीका नमूनों, polymorphic variants, और भविष्य के exploits पर सामान्यीकृत होता है जो समान parser लॉजिक का दुरुपयोग करते हैं।
|
||||
|
||||
Key idea: encode structural impossibilities and cross‑field inconsistencies that only appear when a vulnerable decoder/parser state is reached.
|
||||
|
||||
See also:
|
||||
|
||||
{{#ref}}
|
||||
pdf-file-analysis.md
|
||||
{{#endref}}
|
||||
|
||||
|
||||
## Why structure, not signatures
|
||||
|
||||
जब weaponized samples उपलब्ध नहीं होते और payload bytes बदलते रहते हैं, पारंपरिक IOC/YARA patterns विफल हो जाते हैं। संरचनात्मक डिटेक्शन कंटेनर के घोषित लेआउट की जाँच करता है बनाम उस लेआउट के जो फ़ॉर्मैट इम्प्लीमेंटेशन के लिए गणितीय या सैमांटिक रूप से संभव है।
|
||||
|
||||
Typical checks:
|
||||
- spec और सुरक्षित implementations से व्युत्पन्न table sizes और bounds को वैलिडेट करें
|
||||
- अवैध/undocumented opcodes या embedded bytecode में state transitions को flag करें
|
||||
- metadata को actual encoded stream components के साथ cross‑check करें
|
||||
- parser confusion या integer overflow set‑ups का संकेत देने वाले विरोधाभासी फ़ील्ड्स का पता लगाएँ
|
||||
|
||||
नीचे कई high‑impact chains के लिए ठोस, field‑tested पैटर्न दिए गए हैं।
|
||||
|
||||
---
|
||||
|
||||
## PDF/JBIG2 – FORCEDENTRY (CVE‑2021‑30860)
|
||||
|
||||
लक्षित: JBIG2 symbol dictionaries जो PDFs के अंदर embedded होते हैं (अक्सर mobile MMS parsing में उपयोग होते हैं)।
|
||||
|
||||
संरचनात्मक संकेत:
|
||||
- ऐसा विरोधाभासी dictionary state जो benign content में नहीं हो सकता लेकिन arithmetic decoding में overflow ट्रिगर करने के लिए आवश्यक होता है।
|
||||
- refinement coding के दौरान global segments के संदिग्ध उपयोग के साथ असामान्य symbol counts।
|
||||
|
||||
Pseudo‑logic:
|
||||
```pseudo
|
||||
# Detecting impossible dictionary state used by FORCEDENTRY
|
||||
if input_symbols_count == 0 and (ex_syms > 0 and ex_syms < 4):
|
||||
mark_malicious("JBIG2 impossible symbol dictionary state")
|
||||
```
|
||||
व्यावहारिक ट्रायज:
|
||||
- PDF से JBIG2 स्ट्रीम्स की पहचान करें और उन्हें एक्सट्रैक्ट करें
|
||||
- pdfid/pdf-parser/peepdf का उपयोग करके स्ट्रीम्स का पता लगाएं और dump करें
|
||||
- arithmetic coding flags और symbol dictionary parameters को JBIG2 spec के खिलाफ सत्यापित करें
|
||||
|
||||
Notes:
|
||||
- embedded payload signatures के बिना भी काम करता है
|
||||
- व्यवहार में Low FP कम होते हैं क्योंकि flagged state गणितीय रूप से असंगत है
|
||||
|
||||
---
|
||||
|
||||
## WebP/VP8L – BLASTPASS (CVE‑2023‑4863)
|
||||
|
||||
लक्ष्य: WebP lossless (VP8L) Huffman prefix‑code tables.
|
||||
|
||||
संरचनात्मक संकेत:
|
||||
- निर्मित Huffman टेबल्स का कुल आकार reference/patched implementations द्वारा अपेक्षित सुरक्षित ऊपरी सीमा से अधिक है, जो overflow की पूर्वशर्त को सूचित करता है।
|
||||
|
||||
Pseudo‑logic:
|
||||
```pseudo
|
||||
# Detect malformed Huffman table construction triggering overflow
|
||||
let total_size = sum(table_sizes)
|
||||
if total_size > 2954: # example bound: FIXED_TABLE_SIZE + MAX_TABLE_SIZE
|
||||
mark_malicious("VP8L oversized Huffman tables")
|
||||
```
|
||||
व्यावहारिक प्राथमिक जाँच:
|
||||
- WebP container chunks जाँचें: VP8X + VP8L
|
||||
- VP8L prefix codes को पार्स करें और वास्तविक आवंटित तालिका आकार की गणना करें
|
||||
|
||||
नोट्स:
|
||||
- payload के byte‑level polymorphism के प्रति मजबूत
|
||||
- सीमा upstream limits/patch analysis से व्युत्पन्न है
|
||||
|
||||
---
|
||||
|
||||
## TrueType – TRIANGULATION (CVE‑2023‑41990)
|
||||
|
||||
लक्ष्य: fpgm/prep/glyf प्रोग्राम्स के अंदर TrueType bytecode।
|
||||
|
||||
संरचनात्मक संकेत:
|
||||
- Apple के interpreter में undocumented/forbidden opcodes की उपस्थिति, जिन्हें exploit chain द्वारा उपयोग किया जा रहा है।
|
||||
|
||||
स्यूडो‑लॉजिक:
|
||||
```pseudo
|
||||
# Flag undocumented TrueType opcodes leveraged by TRIANGULATION
|
||||
switch opcode:
|
||||
case 0x8F, 0x90:
|
||||
mark_malicious("Undocumented TrueType bytecode")
|
||||
default:
|
||||
continue
|
||||
```
|
||||
प्रायोगिक ट्रायेज़:
|
||||
- font टेबल्स डंप करें (उदा., fontTools/ttx का उपयोग करके) और fpgm/prep/glyf प्रोग्राम स्कैन करें
|
||||
- presence checks से जानकारी पाने के लिए interpreter को पूरी तरह emulate करने की आवश्यकता नहीं
|
||||
|
||||
नोट:
|
||||
- अगर nonstandard fonts में unknown opcodes शामिल हों तो यह कभी-कभार दुर्लभ FPs उत्पन्न कर सकता है; secondary tooling से validate करें
|
||||
|
||||
---
|
||||
|
||||
## DNG/TIFF – CVE‑2025‑43300
|
||||
|
||||
Target: DNG/TIFF image metadata बनाम encoded stream में वास्तविक component count (उदा., JPEG‑Lossless SOF3).
|
||||
|
||||
Structural signals:
|
||||
- EXIF/IFD fields (SamplesPerPixel, PhotometricInterpretation) और pipeline द्वारा उपयोग किए गए image stream header से parsed component count के बीच असंगति।
|
||||
|
||||
छद्म-तर्क:
|
||||
```pseudo
|
||||
# Metadata claims 2 samples per pixel but stream header exposes only 1 component
|
||||
if samples_per_pixel == 2 and sof3_components == 1:
|
||||
mark_malicious("DNG/TIFF metadata vs. stream mismatch")
|
||||
```
|
||||
व्यावहारिक triage:
|
||||
- प्राथमिक IFD और EXIF टैग पार्स करें
|
||||
- एम्बेडेड JPEG‑Lossless header (SOF3) को ढूँढें और पार्स करें तथा कम्पोनेंट गिनती की तुलना करें
|
||||
|
||||
नोट:
|
||||
- वाइल्ड में शोषण की रिपोर्ट मिली है; संरचनात्मक संगतता जाँचों के लिए उत्कृष्ट उम्मीदवार
|
||||
|
||||
---
|
||||
|
||||
## कार्यान्वयन पैटर्न और प्रदर्शन
|
||||
|
||||
एक व्यावहारिक स्कैनर को:
|
||||
- फ़ाइल प्रकार को ऑटो‑डिटेक्ट करें और केवल संबंधित analyzers (PDF/JBIG2, WebP/VP8L, TTF, DNG/TIFF) को डिस्पैच करें
|
||||
- स्ट्रीम/आंशिक‑पार्स करें ताकि आवंटन न्यूनतम हों और पूर्व‑समाप्ति सक्षम हो
|
||||
- बड़े पैमाने वाले triage के लिए analyses को समानांतर (thread‑pool) चलाएँ
|
||||
|
||||
ElegantBouncer के साथ उदाहरण वर्कफ़्लो (इन जाँचों की open‑source Rust implementation):
|
||||
```bash
|
||||
# Scan a path recursively with structural detectors
|
||||
$ elegant-bouncer --scan /path/to/directory
|
||||
|
||||
# Optional TUI for parallel scanning and real‑time alerts
|
||||
$ elegant-bouncer --tui --scan /path/to/samples
|
||||
```
|
||||
---
|
||||
|
||||
## DFIR टिप्स और किनारे के मामले
|
||||
|
||||
- Embedded objects: PDFs में images (JBIG2) और fonts (TrueType) एम्बेड हो सकते हैं; इन्हें निकालें और पुनरावर्ती रूप से स्कैन करें
|
||||
- Decompression safety: ऐसी लाइब्रेरीज़ उपयोग करें जो आवंटन से पहले टेबल/बफ़र की कड़ाई से सीमा निर्धारित करें
|
||||
- False positives: नियमों को सावधान रखें, उन विरोधाभासों को प्राथमिकता दें जो spec के अंतर्गत असंभव हों
|
||||
- Version drift: जब upstream parsers सीमाएँ बदलें तो bounds को फिर से बेसलाइन करें (उदा., VP8L table sizes)
|
||||
|
||||
---
|
||||
|
||||
## Related tools
|
||||
|
||||
- ElegantBouncer – उपरोक्त डिटेक्शनों के लिए संरचनात्मक स्कैनर
|
||||
- pdfid/pdf-parser/peepdf – PDF ऑब्जेक्ट निकालना और स्थैतिक विश्लेषण
|
||||
- pdfcpu – PDF linter/sanitizer
|
||||
- fontTools/ttx – TrueType टेबल्स और bytecode डंप करें
|
||||
- exiftool – TIFF/DNG/EXIF मेटाडेटा पढ़ें
|
||||
- dwebp/webpmux – WebP मेटाडेटा और chunks पार्स करें
|
||||
|
||||
---
|
||||
|
||||
## References
|
||||
|
||||
- [ELEGANTBOUNCER: When You Can't Get the Samples but Still Need to Catch the Threat](https://www.msuiche.com/posts/elegantbouncer-when-you-cant-get-the-samples-but-still-need-to-catch-the-threat/)
|
||||
- [ElegantBouncer project (GitHub)](https://github.com/msuiche/elegant-bouncer)
|
||||
- [Researching FORCEDENTRY: Detecting the exploit with no samples](https://www.msuiche.com/posts/researching-forcedentry-detecting-the-exploit-with-no-samples/)
|
||||
- [Researching BLASTPASS – Detecting the exploit inside a WebP file (Part 1)](https://www.msuiche.com/posts/researching-blastpass-detecting-the-exploit-inside-a-webp-file-part-1/)
|
||||
- [Researching BLASTPASS – Analysing the Apple & Google WebP PoC file (Part 2)](https://www.msuiche.com/posts/researching-blastpass-analysing-the-apple-google-webp-poc-file-part-2/)
|
||||
- [Researching TRIANGULATION – Detecting CVE‑2023‑41990 with single‑byte signatures](https://www.msuiche.com/posts/researching-triangulation-detecting-cve-2023-41990-with-single-byte-signatures/)
|
||||
- [CVE‑2025‑43300: Critical vulnerability found in Apple’s DNG image processing](https://www.msuiche.com/posts/cve-2025-43300-critical-vulnerability-found-in-apples-dng-image-processing/)
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
Loading…
x
Reference in New Issue
Block a user