Skip to main content

🛡️ Flaxon Hack & Security

flaxon Logo

PyPI version License: MIT Code style: ruff

Real security testing, monitoring, auditing, and system hardening toolkit for Flaxon.

Windows Support

✅ Core features work on Windows:

  • Network scanning
  • System monitoring
  • Security auditing
  • System hardening
  • Web security testing

⚠️ Advanced exploit features (pwntools) have limited support on Windows. For full pwntools functionality, use Linux or macOS.

📚 Table of Contents

📚 Table of Contents

Flaxon Hack & Security is a security toolkit built for the Flaxon Python framework. It provides network reconnaissance, system monitoring, security auditing, web security testing, exploit research, payload generation, and system hardening capabilities.

It can be used as a standalone CLI, an interactive Linux-style terminal, or integrated directly into Flaxon applications.

⚠️ IMPORTANT: This toolkit performs real security operations. It can establish network connections, inspect systems, modify configuration files, execute security tests, and perform other privileged operations. Use it only on systems you own or have explicit authorization to test.


✨ Features

Feature Description
📡 Network Scanning TCP/SYN scanning, port discovery, banner grabbing, DNS enumeration, and traceroute
🖥️ System Monitoring CPU, memory, disk, process, network, and system statistics
🌐 Web Security Testing Crawling, endpoint fuzzing, directory scanning, and security testing
💥 Exploit Testing Security research and authorized exploit testing
🧪 Payload Generation Security research payload-generation utilities
🔐 System Hardening Security auditing, configuration hardening, and compliance checks
📋 Security Auditing Identify configuration and security weaknesses
🐧 Linux Simulator Interactive Linux-style terminal with access to security commands
🔌 Flaxon Plugin Use security capabilities directly inside Flaxon applications
📝 Audit Logging Record security operations for auditing and investigation
⚙️ Configurable Configure scanning, monitoring, web testing, hardening, and logging

📦 Installation

Basic Installation

pip install flaxon-hack-security

Full Installation

Install the optional web-security and additional dependencies:

pip install "flaxon-hack-security[full]"

Development Installation

For contributors:

pip install "flaxon-hack-security[dev]"

Verify Installation

flaxon-hack --help

Check the installed version:

flaxon-hack --version

🚀 Quick Start

Network Scanning

Scan a single authorized host:

flaxon-hack scan --target 192.168.1.1

Scan specific ports:

flaxon-hack scan \
  --target 192.168.1.1 \
  --ports 22,80,443

Scan with service banner detection:

flaxon-hack scan \
  --target 192.168.1.1 \
  --banner \
  --verbose

Scan an authorized network:

flaxon-hack scan --target 192.168.1.0/24

🖥️ System Monitoring

Monitor everything:

flaxon-hack monitor --all

Monitor selected resources:

flaxon-hack monitor --cpu --memory --disk

Show processes:

flaxon-hack monitor --processes

Change the monitoring interval:

flaxon-hack monitor --all --interval 0.5

🔎 Security Audit

Run a complete security audit:

flaxon-hack secure --audit

Audit a specific security area:

flaxon-hack secure --target ssh --audit

🔐 System Hardening

Always perform a dry run first:

flaxon-hack secure --target all --dry-run

Apply hardening:

sudo flaxon-hack secure --target all

Available hardening targets include:

all
ssh
network
system
file_permissions
kernel
firewall

🐧 Linux Simulator

Launch the interactive Linux-style environment:

flaxon-hack simulator

Example:

[root@flaxon-sec ~]# scan --target 192.168.1.1
[root@flaxon-sec ~]# monitor --all
[root@flaxon-sec ~]# audit
[root@flaxon-sec ~]# harden --all --dry-run
[root@flaxon-sec ~]# help
[root@flaxon-sec ~]# exit

The simulator provides:

  • Real command execution
  • Persistent working directory
  • Command history
  • Built-in help
  • System monitoring
  • Security toolkit access
  • Linux-style commands

📚 CLI Commands

📡 Network Commands

scan

Perform network scanning.

flaxon-hack scan [OPTIONS]
Option Description Default
--target, -t Target IP, CIDR, or domain Required
--ports, -p Port range or list 1-1000
--scan-type tcp or syn tcp
--banner Grab service banners False
--verbose, -v Verbose output False

Example:

flaxon-hack scan \
  -t 192.168.1.1 \
  -p 22,80,443 \
  --banner \
  -v

Other Network Commands

Command Description
scan Network scanning
sniff Packet sniffing
traceroute Route tracing
dns_enum DNS enumeration
port_scan Port scanning

📊 System Commands

monitor

Monitor system resources.

flaxon-hack monitor [OPTIONS]
Option Description
--cpu Monitor CPU usage
--memory Monitor memory
--disk Monitor disk usage
--processes Show running processes
--all Monitor everything
--interval Update interval

Other system commands:

Command Description
monitor System monitoring
process Process management
file_watch File-change monitoring
sys_info System information
network_stat Network statistics

🌐 Web Security Commands

Command Description
crawl Web crawling
fuzz Endpoint fuzzing
dir_scan Directory scanning
sql_inject SQL injection testing

Example:

flaxon-hack crawl --url https://example.com

Use web-security testing only against applications you own or are explicitly authorized to assess.


💥 Exploit Testing

The toolkit supports authorized exploit research and testing.

flaxon-hack exploit [OPTIONS]
Option Description Default
--name, -n Exploit name Required
--target, -t Target Required
--offset Buffer offset 64

Supported research/test modules listed by the project include:

heartbleed
buffer_overflow
format_string
struts2
sql_inject
command_inject
path_traversal
xss

Example:

flaxon-hack exploit \
  --name shellshock \
  --target http://authorized-test-host/cgi-bin/test.cgi

🧪 Payload Generation

Payload-generation utilities are available for authorized security research.

flaxon-hack payload [OPTIONS]
Option Description Default
--type, -t Payload type reverse_shell
--host, -h Host 127.0.0.1
--port, -p Port 4444
--output, -o Output file None

Available payload types documented by the project include:

reverse_shell
bind_shell
meterpreter
web_shell

Example:

flaxon-hack payload \
  --type reverse_shell \
  --host 127.0.0.1 \
  --port 4444 \
  --output shell.py

⚠️ Payloads should only be generated and used inside systems and environments where you have explicit authorization.


🔐 Security Commands

secure

Security auditing and system hardening:

flaxon-hack secure [OPTIONS]
Option Description
--target, -t Hardening target
--dry-run Show planned changes without applying them
--audit Run security audit

Examples:

# Audit
flaxon-hack secure --audit
# Preview changes
flaxon-hack secure --target all --dry-run
# Apply hardening
sudo flaxon-hack secure --target all

Other security commands:

Command Description
harden System hardening
audit Security audit
compliance Compliance checking

🐧 Linux Simulator

The Linux Simulator provides an interactive Linux-style security environment.

Start it with:

flaxon-hack simulator

Built-in Commands

Command Description
help Show available commands
clear Clear terminal
exit Exit simulator
pwd Print working directory
cd <dir> Change directory
ls [-la] List files
cat <file> Display file
echo <text> Print text
history Command history
whoami Current user
hostname Hostname
date Current date
scan Network scanning
monitor System monitoring
audit Security audit
harden System hardening
payload Payload generation
ps Process list
top Process monitoring
df Disk usage
du Directory size
free Memory information
uname System information
who Logged-in users

Example:

[root@flaxon-sec ~]# scan --target 192.168.1.1
Scanning 192.168.1.1...

[root@flaxon-sec ~]# monitor --all
System Statistics:
  CPU: 12.5%
  Memory: 45.2%
  Disk: 32.1%

[root@flaxon-sec ~]# audit
Security Audit Results:
  ✓ SSH Configuration
  ⚠ Firewall Configuration
  ✓ Open Ports
  ✓ Password Policy

[root@flaxon-sec ~]# harden --all --dry-run
DRY RUN - No changes will be made

[root@flaxon-sec ~]# exit

🔌 Flaxon Plugin Integration

Flaxon Hack & Security can be loaded as a plugin inside a Flaxon application.

from flaxon import Flaxon
from flaxon_hack_security import HackSecurityPlugin

app = Flaxon("my-security-app")

app.plugins.load_plugin(
    HackSecurityPlugin(
        mode="plugin",
        security_level="high",
        audit_enabled=True,
    )
)

Security API

@app.get("/api/scan")
async def scan(request):
    target = request.query_params.get("target")

    result = await app.state.hack_security.scan(target)

    return result

Monitor system statistics:

@app.get("/api/monitor")
async def monitor(request):
    stats = await app.state.hack_security.monitor()

    return stats

Harden a system:

@app.post("/api/harden")
async def harden(request):
    data = await request.json()

    results = await app.state.hack_security.harden(
        target=data.get("target", "all"),
        dry_run=data.get("dry_run", False),
    )

    return results

Plugin API

Method Description
scan(target, ports="1-1000", **kwargs) Network scanning
monitor(**kwargs) System monitoring
exploit(name, target, **kwargs) Authorized exploit testing
harden(target="all", **kwargs) System hardening
audit(**kwargs) Security audit
get_engine(name) Get a security engine

⚙️ Security Engines

Flaxon Hack & Security is organized around independent security engines.

ScanEngine

Network scanning, DNS enumeration, and route tracing.

from flaxon_hack_security.engines import ScanEngine

engine = ScanEngine(
    max_workers=200,
    timeout=5.0,
)

result = await engine.scan(
    "192.168.1.1",
    "1-1000",
    scan_type="tcp",
)

records = await engine.dns_enum("example.com")

hops = await engine.traceroute("8.8.8.8")

MonitorEngine

System monitoring using system statistics and process information.

from flaxon_hack_security.engines import MonitorEngine

engine = MonitorEngine()

stats = await engine.get_stats()

processes = await engine.get_processes(
    sort_by="cpu",
    limit=20,
)

Continuous monitoring:

await engine.start_monitoring(
    interval=5.0,
    thresholds={
        "cpu": 80.0,
        "memory": 80.0,
        "disk": 80.0,
    },
)

ExploitEngine

Provides exploit-research and authorized testing functionality.

from flaxon_hack_security.engines import ExploitEngine

engine = ExploitEngine()

exploits = await engine.list_exploits()

Run an authorized security test:

result = await engine.run_exploit(
    "shellshock",
    "http://authorized-test-host/cgi-bin/test.cgi",
)

SecureEngine

System auditing and hardening.

from flaxon_hack_security.engines import SecureEngine

engine = SecureEngine()

results = await engine.audit()

Preview hardening:

results = await engine.harden(
    "all",
    dry_run=True,
)

Check hardening status:

status = engine.get_hardening_status()

📝 Configuration

Create a security.yml file in your project root:

mode: cli

log_level: info
audit_enabled: true

network:
  default_ports: "1-1000"
  timeout: 5.0
  scan_rate: 1000
  max_workers: 200

monitor:
  interval: 5.0
  cpu: true
  memory: true
  disk: true
  files:
    - /etc
    - /var/log

thresholds:
  cpu: 80.0
  memory: 80.0
  disk: 80.0
  load: 10.0
  swap: 50.0

web:
  user_agent: "Flaxon Security Scanner/1.0"
  timeout: 10.0
  max_depth: 3
  max_pages: 50

exploit:
  payload_dir: ~/.flaxon/exploits
  shellcode_dir: ~/.flaxon/shellcode
  timeout: 30.0

hardening:
  cis_level: 1
  pci_dss: false
  hipaa: false
  backup_dir: /var/backups/flaxon-security

Load configuration:

from flaxon_hack_security.utils import load_config

config = load_config()

Or load a specific configuration:

config = load_config("/path/to/security.yml")

📋 Audit Logging

Security operations can be logged for auditing and investigation.

Example:

[2026-01-15 14:23:45] INFO: Scan started: 192.168.1.0/24
[2026-01-15 14:23:50] INFO: Port 22 open on 192.168.1.1
[2026-01-15 14:23:55] WARNING: SMB vulnerability detected
[2026-01-15 14:24:00] ALERT: Potential security issue detected

🧪 Real Implementation

Flaxon Hack & Security is designed to perform real system operations rather than merely simulate them.

Capability Implementation
Network scanning TCP connections and raw-socket scanning
System monitoring System statistics and process information
Hardening Modifies applicable system configuration
Security testing Performs actual authorized security tests
File operations Reads and writes real files
Process management Works with real system processes

The project documentation identifies the following dependencies for core functionality:

  • psutil — System monitoring
  • scapy — Packet operations
  • requests — Web testing
  • dnspython — DNS enumeration

Some privileged functionality may require elevated permissions.


🔑 Permissions

Depending on the operation and operating system, elevated privileges may be required for:

  • Raw-socket/SYN scanning
  • System hardening
  • Modifying protected configuration files
  • Certain packet operations
  • Other privileged system operations

For example:

sudo flaxon-hack secure --target all

Always review a hardening operation with --dry-run before applying changes.


🛠️ Troubleshooting

Permission Denied

If you receive:

Permission denied: [Errno 13] Permission denied

Some operations may require elevated permissions:

sudo flaxon-hack secure --target all

Missing psutil

Install it with:

pip install psutil

Missing scapy

Install it with:

pip install scapy

Missing System Files

Some hardening checks depend on operating-system-specific files.

For example:

/etc/ssh/sshd_config

may not exist on every system.


Debug Mode

Use verbose output:

flaxon-hack scan --target 192.168.1.1 --verbose

or:

flaxon-hack monitor --all --verbose

Check Dependencies

pip list | grep -E "flaxon|psutil|scapy|requests|dnspython"

📖 Example Workflows

Network Security Assessment

Only against an authorized network:

# Discover authorized hosts
flaxon-hack scan \
  --target 192.168.1.0/24 \
  --ports 22,80,443

# Inspect an authorized host
flaxon-hack scan \
  --target 192.168.1.10 \
  --banner

# Run a security audit
flaxon-hack secure --audit

System Hardening

Recommended workflow:

# 1. Audit the system
flaxon-hack secure --audit

# 2. Preview changes
flaxon-hack secure \
  --target all \
  --dry-run

# 3. Apply changes
sudo flaxon-hack secure \
  --target all

# 4. Verify
flaxon-hack secure --audit

Monitoring

from flaxon_hack_security.engines import MonitorEngine

engine = MonitorEngine()

stats = await engine.get_stats()

print(f"CPU: {stats.cpu_percent}%")
print(f"Memory: {stats.memory_percent}%")

🗂️ Project Structure

flaxon-hack-security/
│
├── pyproject.toml
├── README.md
├── LICENSE
│
├── src/
│   └── flaxon_hack_security/
│       │
│       ├── __init__.py
│       ├── plugin.py
│       ├── cli.py
│       ├── tui.py
│       ├── simulator.py
│       │
│       ├── commands/
│       │   ├── network.py
│       │   ├── system.py
│       │   ├── web.py
│       │   ├── exploit.py
│       │   ├── monitor.py
│       │   └── secure.py
│       │
│       ├── engines/
│       │   ├── scan_engine.py
│       │   ├── monitor_engine.py
│       │   ├── exploit_engine.py
│       │   └── secure_engine.py
│       │
│       ├── linux/
│       │   ├── subprocess.py
│       │   ├── filesystem.py
│       │   └── environment.py
│       │
│       └── utils/
│           ├── logger.py
│           ├── config.py
│           └── helpers.py
│
└── tests/
    ├── test_commands.py
    ├── test_engines.py
    └── test_integration.py

📌 Quick Command Cheatsheet

Category Command Purpose
Network flaxon-hack scan -t 192.168.1.1 Basic scan
Network flaxon-hack scan -t 192.168.1.1 -p 22,80,443 --banner Port/banner scan
Network flaxon-hack scan -t 192.168.1.0/24 Network discovery
Monitor flaxon-hack monitor --all Monitor system
Monitor flaxon-hack monitor --cpu --memory CPU & memory
Monitor flaxon-hack monitor --processes Process information
Security flaxon-hack secure --audit Security audit
Security flaxon-hack secure --target all --dry-run Preview hardening
Security sudo flaxon-hack secure --target all Apply hardening
Simulator flaxon-hack simulator Launch Linux simulator

🧭 Common Flags

-t, --target      Target IP, domain, CIDR, or URL
-p, --ports       Port range or port list
--banner          Grab service banners
-v, --verbose     Verbose output
--dry-run         Preview changes
--all             Apply to all supported targets

Port Examples

1-1000
22,80,443
1-65535
22,80,443,8000-9000

📊 Security Levels

The documented security levels are:

low       Basic checks with minimal modification
medium    Standard hardening
high      Aggressive hardening
critical  Maximum security

Use higher levels carefully and always review the changes before applying them.


📤 Export Results

Save scan results:

flaxon-hack scan \
  --target 192.168.1.1 \
  > scan_results.txt

Save audit results:

flaxon-hack secure --audit > audit_report.txt

Save a hardening plan:

flaxon-hack secure \
  --target all \
  --dry-run \
  > hardening_plan.txt

🛡️ Security & Legal Disclaimer

⚠️ READ BEFORE USING

Flaxon Hack & Security is a real security-testing toolkit.

It is intended for:

  • Authorized penetration testing
  • Security research
  • Defensive security
  • Internal security auditing
  • Educational security labs
  • Controlled testing environments
  • Systems owned or explicitly authorized by the user

❌ Do NOT use it against:

  • Systems you do not own
  • Networks without authorization
  • Production systems without approval
  • Third-party infrastructure without permission
  • Any system where security testing is prohibited

⚠️ Important Risks

Network scanning, exploit testing, payload generation, shellcode execution, and system hardening can have significant consequences.

System hardening may change system functionality.

Exploit testing may crash services or applications.

Security testing may generate network traffic that is detected by monitoring systems.

Some operations may require administrator/root privileges.

Best Practices

  1. Obtain written authorization before testing.
  2. Define the scope and rules of engagement.
  3. Use isolated environments for exploit research.
  4. Back up systems before hardening.
  5. Start with --dry-run where available.
  6. Document testing activities.
  7. Avoid testing production systems unless explicitly authorized.
  8. Follow applicable laws and organizational policies.

The developers and contributors are not responsible for misuse of this software.

Use Flaxon Hack & Security responsibly and ethically.


📄 License

Flaxon Hack & Security is licensed under the MIT License.

See LICENSE for the complete license text.


🚀 Project Status

Flaxon Hack & Security is intended to provide a modular security toolkit for the Flaxon ecosystem.

The architecture separates:

CLI
 │
 ├── Network Commands
 ├── System Commands
 ├── Web Commands
 ├── Exploit Research
 └── Security Commands
        │
        ▼
     Engines
        │
        ├── ScanEngine
        ├── MonitorEngine
        ├── ExploitEngine
        └── SecureEngine
        │
        ▼
   Flaxon Plugin

This allows the same security capabilities to be used from the command line, interactive simulator, Python API, or a Flaxon application.


⭐ Flaxon Ecosystem

Flaxon Hack & Security is designed to extend the Flaxon ecosystem with security-focused tooling while keeping the components modular and reusable.

Flaxon
  │
  └── Flaxon Hack & Security
        ├── Network Security
        ├── System Monitoring
        ├── Security Auditing
        ├── System Hardening
        ├── Web Security Testing
        ├── Security Research
        └── Linux-style Security Terminal

Build. Secure. Audit. Harden.

🛡️ Flaxon Hack & Security

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flaxon_hack_security-0.1.3.tar.gz (105.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flaxon_hack_security-0.1.3-py3-none-any.whl (109.2 kB view details)

Uploaded Python 3

File details

Details for the file flaxon_hack_security-0.1.3.tar.gz.

File metadata

  • Download URL: flaxon_hack_security-0.1.3.tar.gz
  • Upload date:
  • Size: 105.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.1

File hashes

Hashes for flaxon_hack_security-0.1.3.tar.gz
Algorithm Hash digest
SHA256 2ed1605c5bfb10dbe9482d3951c26fc7b99dea6ae683c5667df28b86686674e7
MD5 fe28d462386070f186f125deb630db69
BLAKE2b-256 8a49875fe0f0546c340e088506975886b11934e01824e587f7cee72743514d52

See more details on using hashes here.

File details

Details for the file flaxon_hack_security-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for flaxon_hack_security-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f71164ff187020ec4845febebccdd851497fa09016aa1b0a700f7b9f1289bf15
MD5 b214caab1c50c8634a546e4c762aadee
BLAKE2b-256 b000f37a2458c5191887e11f2e08fb6d299de930c2ef6392cfa9aec23f0ce7da

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page