Skip to content

comorevi21/anopheles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦟 Release Note: Anopheles v1.1 (Stable)

"The Stealthy Blood-Sucker for LFI Post-Exploitation"

English | 日本語

English Documentation

🦟 Release Note: Anopheles v1.1 (Stable)

"The Stealthy Blood-Sucker for LFI Post-Exploitation"

Anopheles is a specialized reconnaissance toolkit designed to automate privilege escalation and sensitive information gathering by traversing the Linux /proc filesystem via Local File Inclusion (LFI) vulnerabilities.

Version 1.1 introduces significant enhancements in terminal stability for Windows environments and greatly improved visibility during large-scale scans.


🚀 Overview

Anopheles leverages an LFI vulnerability as a "needle" to perform a comprehensive scan of the target system's internal process structure, which is normally invisible from the outside. It is specifically optimized for identifying the owner (UID) of particular TCP ports and extracting their execution paths and arguments.

✨ Key Features

🛡️ Three-Stage Enumeration Engine

  1. Phase 1 (Connectivity): Automatically validates the effectiveness of the traversal depth (10 levels) via /etc/passwd read tests.
  2. Phase 2 (TCP Mapping): Identifies the target user (UID) by performing hexadecimal analysis on /proc/net/tcp.
  3. Phase 3 (Deep Scan): Performs a sequential PID enumeration

🧩 Data Integrity & Display

  • Latin-1 Memory Recovery: Safely decodes /proc/[PID]/cmdline even when binary data is present, minimizing the text loss seen in conventional tools.
  • Smart Sanitization: Automatically strips null bytes (\x00) and non-ASCII control characters, completely eliminating "garbage characters" (mojibake) in Windows environments.

🆕 What's New in v1.1

💎 UI/UX Improvements

  • Banner Realignment: Fixed the alignment issue between the ASCII "Mosquito" icon and the "ANOPHELES" text for a more professional look.
  • Dynamic Progress Spinner: Implemented a rotating spinner for each PID request, allowing operators to instantly verify that the scan is progressing.
  • Completion Signal: Displays a summary upon completion of the full scan to notify the operator.

⚙️ Technical Fixes

  • Requests Optimization: Improved scan stability under unstable network conditions through optimized timeout settings and exception handling.
  • Winpty Support: Designed with consideration for signal transmission issues specific to Windows Git Bash (MINGW64).

📖 Quick Start

We highly recommend using winpty when running in Windows (Git Bash/MINGW64) environments.

Standard Execution (Linux / macOS / PowerShell)

python anopheles.py -u http://hoge.hoge:8000/ -p page -P 6048 --max 1000

Windows Git Bash / MINGW64 Execution

winpty python anopheles.py -u http://hoge.hoge:8000/ -p page -P 6048 --max 1000

🛠️ Command Line Arguments

Option Argument Description
-u TARGET_URL The target URL (e.g., http://airplane.thm:8000/)
-p PARAMETER Parameter name vulnerable to LFI (e.g., page, file)
-P PORT Target port number to identify the UID (e.g., 6048)
--max MAX_PID Upper limit for PID brute-forcing (Default: 1000)

⚠️ Disclaimer

This tool is intended for educational purposes and authorized security testing (Penetration Testing) only. The developer assumes no liability for any misuse or damage caused by this tool. Use it responsibly and only on systems you have explicit permission to test.



日本語ドキュメント

Anopheles は、Linuxの /proc ファイルシステムから、権限昇格や機密情報の列挙を自動化するためのLFI(Local File Inclusion)特化型偵察ツールキットです。 v1.1 では、Windowsターミナル環境での表示の堅牢性と、大規模スキャンにおける視認性が大幅に強化されました。

🚀 Overview

本ツールは、Webアプリケーションに存在するLFI脆弱性を「針」として利用し、本来外部からは不可視であるターゲットシステム内部のプロセス構造を全走査します。 特に、特定のTCPポートをリスニングしているプロセスの所有者(UID)の特定と、その実行パス・引数(Command Line)を静的に抽出することに最適化されています。

✨ Key Features

🛡️ Three-Stage Enumeration Engine

  1. Phase 1 (Connectivity): /etc/passwd の読み取りテストにより、トラバーサル深度(10階層)の有効性を自動検証。
  2. Phase 2 (TCP Mapping): /proc/net/tcp の16進数解析による、ポート占有ユーザー(UID)の特定。
  3. Phase 3 (Deep Scan): PID全走査。対象UIDに紐づくプロセスのみをリアルタイムでフィルタリング。

🧩 Data Integrity & Display

  • Latin-1 Memory Recovery: バイナリデータが混在する /proc/[PID]/cmdline を安全にデコードし、従来発生していたテキストの欠落を最小化。
  • Smart Sanitization: ヌルバイト(\x00)や非ASCII制御文字を自動除去。Windows環境における「文字化け(Non-ASCII garbage)」を完全に排除。

🆕 What's New in v1.1

💎 UI/UX 改善

  • Banner Realignment: アスキーアートの「蚊」アイコンと「ANOPHELES」テキストの行ズレを完全に修正し、視認性を向上。
  • Dynamic Progress Spinner: 各PIDへのリクエストごとに回転するスピナーを実装。スキャンのハングアップを即座に判別可能。
  • Completion Signal: 全スキャン終了時にサマリーを表示し、オペレーターへ完了を通知。

⚙️ 技術的な修正

  • Requests Optimization: タイムアウト設定と例外処理の最適化により、不安定なネットワーク環境下でのスキャン安定性を向上。
  • Winpty Support: Windows Git Bash上での信号伝達問題を考慮した設計。

📖 Quick Start

Windows (Git Bash/MINGW64) で実行する場合は、winpty の併用を推奨します。

# 基本実行例
python anopheles.py -u http://hoge.hoge:8000/ -p page -P 6048 --max 1000
# Git Bash/MINGW64 実行例
winpty python anopheles.py -u http://hoge.hoge:8000/ -p page -P 6048 --max 1000

🛠️ コマンドライン引数

オプション 引数名 説明
-u TARGET_URL ターゲットとなるURL (例: http://hoge.hoge:8000/)
-p PARAMETER LFI脆弱性を持つパラメータ名 (例: page, file)
-P PORT UIDを特定するための対象ポート番号 (例: 6048)
--max MAX_PID 総当たりを行うPIDの上限値 (デフォルト: 1000)

免責事項

本ツールは、教育および正当な権限を持つセキュリティテスト(ペネトレーションテスト)の目的のみで作成されています。本ツールの誤用や、それによって生じた損害について、開発者は一切の責任を負いません。必ず許可を得たシステムに対してのみ、責任を持って使用してください。

About

Automated LFI post-exploitation toolkit for Linux /proc filesystem enumeration and privilege escalation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages