Advanced Static Malware Analysis Platform
Features β’ Installation β’ Usage β’ API β’ Contributing
PE-Sentinel is a comprehensive static analysis tool for Windows Portable Executable (PE) files. It performs deep inspection of binary structure, import tables, and behavioral patterns to identify potential malware without execution.
- Zero Execution Risk - Entirely static analysis, no sandboxing required
- Rich Header Forensics - Parse undocumented Microsoft Rich headers for compiler fingerprinting and timestamp manipulation detection
- Import Table Intelligence - Density scoring, ordinal ratio analysis, and .NET/Go runtime detection
- MITRE ATT&CK Mapping - Automatic technique identification with confidence scoring
- YARA Integration - Built-in rules plus custom rule support
- Professional Reports - Export to PDF, JSON, Markdown, HTML, or SARIF
- Section entropy calculation with segment-level granularity
- Packer/crypter detection via entropy heuristics
- Permission anomaly detection (RWX sections)
- Size ratio analysis for section inflation detection
- API capability correlation (50+ malicious patterns)
- Process injection detection
- Keylogger indicators
- Ransomware behavior patterns
- Credential theft techniques
- Anti-debug/anti-VM detection
- Compiler/linker tool identification
- Visual Studio version detection
- Timestamp anomaly detection (time-stomping)
- Build environment fingerprinting
- Import density scoring
- Ordinal import ratio detection
- Runtime detection (.NET, Go, Native)
- Manual loader function identification
- Digital signature validation
- Version information extraction
- Manifest analysis
- Authenticode verification
- Python 3.8 or higher
- pip package manager
# Clone the repository
git clone https://github.com/yourusername/pe-sentinel.git
cd pe-sentinel
# Install dependencies
pip install -r requirements.txt
# Run analysis
python analyze.py sample.exe# YARA support (recommended)
pip install yara-python
# PDF report generation
pip install reportlab
# Disassembly support
pip install capstone# Basic analysis
python analyze.py malware.exe
# Generate PDF report
python analyze.py malware.exe -o report.pdf -f pdf
# Quiet mode (minimal output)
python analyze.py malware.exe -q
# JSON output for automation
python analyze.py malware.exe -f json > results.json
# SARIF output for CI/CD integration
python analyze.py malware.exe -f sarif -o results.sarifpython cli.py suspicious.exeAvailable commands:
show_summary() # File overview
show_sections() # Section analysis with entropy
show_imports() # Import table with suspicious API highlighting
show_threat_analysis() # Detailed threat assessment
find_strings() # Extract ASCII/Unicode strings
search_import("Create") # Search for specific imports
hexdump(0x1000, 256) # View hex dump at offsetcd pe-sentinel-web/backend
python app.py
# Open http://localhost:5000ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
PE-SENTINEL v2.2
Advanced Static Malware Analysis
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
PHASE 1: STRUCTURAL ANALYSIS
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Section Entropy Ratio Perms Score Level
.text 6.45 1.00 R-X 15 π’ LOW
.rdata 5.12 0.89 R-- 5 β
CLEAN
.data 4.23 0.45 RW- 10 β
CLEAN
.rsrc 7.89 1.23 R-- 65 π HIGH
PHASE 2: RICH HEADER ANALYSIS
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Compiler: Visual Studio 2019
Build: 29335
Timestamp Check: β CONSISTENT
PHASE 3: IMPORT ANALYSIS
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Total Imports: 47
Runtime: Native
Ordinal Ratio: 2.1%
PHASE 4: BEHAVIORAL ANALYSIS
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β οΈ Process Injection capability detected
APIs: OpenProcess, VirtualAllocEx, WriteProcessMemory
PHASE 5: MITRE ATT&CK MAPPING
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
T1055 - Process Injection (Defense Evasion)
T1056.001 - Keylogging (Collection)
PHASE 6: FINAL VERDICT
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π΄ THREAT SCORE: 72/100 (HIGH)
Primary Driver: Behavioral indicators
Recommendation: Submit to sandbox for dynamic analysis
# Upload and analyze
curl -X POST -F "file=@sample.exe" http://localhost:5000/api/upload
# Search functions
curl -X POST -H "Content-Type: application/json" \
-d '{"session_id":"abc123","query":"CreateRemote"}' \
http://localhost:5000/api/search/functions
# Export PDF
curl http://localhost:5000/api/export/pdf/{session_id} -o report.pdffrom analyzer import BinaryAnalyzer
analyzer = BinaryAnalyzer("sample.exe")
results = analyzer.analyze()
print(f"Threat Score: {results['scores']['overall']}/100")
print(f"Threat Level: {results['scores']['threat_level']}")
for cap in results['capabilities']:
print(f" - {cap['description']}")pe-sentinel/
βββ core/ # Core analysis modules
β βββ pe_parser.py # PE file parsing
β βββ config.py # Configuration management
β βββ sentinel/ # Analysis engines
β βββ correlators.py # API correlation
β βββ extractors.py # Data extraction
β βββ mitre_mapper.py # MITRE ATT&CK mapping
β βββ verdict_engine.py
βββ pe-sentinel-web/ # Web interface
β βββ backend/
β β βββ app.py # Flask API
β β βββ analyzer.py # Analysis wrapper
β β βββ rich_header.py # Rich header parser
β β βββ import_analyzer.py
β β βββ pdf_report.py # PDF generation
β βββ frontend/
β βββ index.html # Main analyzer UI
β βββ home.html # Landing page
β βββ docs.html # Documentation
β βββ js/main.js # Frontend logic
βββ analyze.py # CLI entry point
βββ cli.py # Interactive mode
βββ requirements.txt
| Component | Weight | Max Score | Description |
|---|---|---|---|
| Structural | 30% | 100 | Entropy, permissions, section anomalies |
| Behavioral | 50% | 100 | API patterns, capability correlation |
| Strings | 10% | 40 | Suspicious string patterns |
| YARA | 10% | 100 | Rule matches |
| Level | Score Range | Interpretation |
|---|---|---|
| CRITICAL | 80-100 | Highly likely malicious |
| HIGH | 60-79 | Probably malicious |
| MEDIUM | 40-59 | Suspicious, needs review |
| LOW | 20-39 | Minor concerns |
| CLEAN | 0-19 | Likely benign |
This project is licensed under the MIT License
- pefile - PE parsing library
- YARA - Pattern matching
- MITRE ATT&CK - Threat framework
- Capstone - Disassembly
Mail - aliomaruniversity@gmail.com
Project Link: https://github.com/ali-asly101/pe-sentinel
Built with β for the security community

