Skip to content

rusted and dusted 2.0

Choose a tag to compare

@s-b-repo s-b-repo released this 09 Nov 01:12
· 1 commit to main since this release

SSH Module Fixes and Improvements

  1. Added colored prompts

All user input prompts now use cyan and bold
Error messages use yellow
Success messages use green
Warning messages use yellow

  1. Fixed async I/O handling

Fixed recv_retry to handle WouldBlock and TimedOut errors
Added timeout handling in attempt_race_condition
Improved error handling for async operations

  1. Fixed non-exhaustive match patterns

Added handling for all possible Result cases
Fixed match statement in recv_retry to handle all cases
Added proper timeout handling in race condition detection

  1. Improved output formatting

Colored output for success, errors, and warnings
Better visual feedback for different message types
Improved post-exploitation action menu with colors

  1. Enhanced error handling

Better error messages with context
Proper handling of connection errors
Improved timeout handling

Module Status:

Compiles without errors
Properly registered in mod.rs
Has pub async fn run function for dispatch system
All functions working correctly
Colored prompts and output
Proper error handling
The SSH module is fully functional and ready to use

Fix for Non-Primitive Cast Error

Problem:

Using as u16 for usize to u16 conversion triggered a non-primitive cast error
The compiler couldn't infer the types correctly

Solution:

Explicitly typed variables as usize for correct inference
Replaced as u16 with try_into() for safe conversion
Added error handling with map_err() to handle conversion failures

The code now:

Uses try_into() for safe numeric conversion
Handles conversion errors properly
Compiles without errors
The port scanner now handles port range validation correctly.

Bug Fix
Problem:

prompt_usize() returns usize, which can be larger than u16 (max 65535)
Direct casting with as u16 truncates silently, causing incorrect port ranges

Solution:

Added validation before casting:
Check that ports are between 1 and 65535
Check that start port ≤ end port
Only cast to u16 after validation
Return clear error messages for invalid input
The code now validates port ranges and prevents silent truncation.

Port Scanner Improvements

  1. Port range selection

All ports (1-65535)
Common ports (21, 22, 23, 25, 53, 80, 443, etc.)
Top 1000 ports
Custom range (user-defined start/end)

  1. Progress display

Real-time percentage
Scan rate (ports/second)
ETA (estimated time remaining)
Updates every 100 ports or on completion

  1. Service detection

Automatic service identification by port number
Service detection from banners (SSH, FTP, SMTP, HTTP, etc.)
Service names displayed next to ports

  1. Banner grabbing

Service-specific probes (HTTP GET requests, SSH banner reads)
HTTP Server header extraction
Improved banner parsing for common services

  1. Statistics and summary

Detailed scan statistics:
TCP: Open, Closed, Filtered/Timeout counts
UDP: Open, Closed, Filtered counts
Scan duration tracking
Summary printed at the end
Statistics saved to output file

  1. Output formatting

Color-coded output:
Green for open ports
Red for closed ports
Yellow for filtered/timeout
Service names displayed with ports
Better organized output structure

  1. User experience

Interactive configuration menu
Default values for quick setup
Clear prompts with colored text
Better error messages
The port scanner now provides more information, better performance tracking, and a clearer interface.

Summary of Fixes and Updates

  1. Fixed bugs
    Port scanner: The linter error appears stale; the code compiles.
    All modules compile without errors.

  2. Added color to payloadgens modules
    batgen.rs

Added colored::* import
Updated prompt function to display prompts in cyan and bold

narutto_dropper.rs

Added colored::* import
Updated prompt function to display prompts in cyan and bold

  1. Verified payloadgens modules are working

Both modules have pub async fn run(_target: &str) -> Result<()> functions
Both are properly registered in mod.rs:

narutto_dropper

batgen

They are automatically registered by the build.rs dispatch system
Both modules compile successfully
Module status

batgen.rs: Working — generates multi-stage batch payload chains

narutto_dropper.rs: Working — generates poly-morphic 3-stage chain-linked stealth dropper
All payloadgens modules are functional and have colored prompts. The codebase compiles without errors.

Fixed bugs

Typo: renamed palto_alto to palo_alto (Palo Alto Networks)
Renamed directory: src/modules/exploits/palto_alto/ → src/modules/exploits/palo_alto/
Updated module declaration in src/modules/exploits/mod.rs
Updated README.md reference
Deprecation warnings: fixed GenericArray usage in the ZTE module
Replaced deprecated cipher::generic_array::GenericArray with cipher::Block
Updated code to use Block::::from([u8; 16]) instead of deprecated clone_from_slice
Removed unnecessary generic-array dependency from Cargo.toml

  1. Shell Interface (src/shell.rs)

Added colored prompt: rsf> in cyan and bold
Colored success/error messages (green for success, red for errors, yellow for warnings)

  1. Creds Modules (All brute force modules)

ssh_bruteforce.rs: Added colored prompts for prompt_required, prompt_default, prompt_yes_no
rdp_bruteforce.rs: Added colored prompts
ftp_bruteforce.rs: Added colored prompts
rtsp_bruteforce_advanced.rs: Added colored prompts
All prompts now display in cyan and bold, with error messages in yellow

  1. Scanner Modules

port_scanner.rs: Added colored prompts for prompt, prompt_bool, prompt_usize
ping_sweep.rs: Added colored prompt for CIDR input
ssdp_msearch.rs: Added colored prompt for port input

  1. Exploit Modules

palo_alto/panos_authbypass_cve_2025_0108.rs: Added colored prompt for port input
zte/zte_zxv10_h201l_rce_authenticationbypass.rs: Added colored prompt for port input
spotube/spotube.rs: Added colored prompts for filename, track ID, codec extension, and port inputs
Color Scheme:
Prompts: Cyan and bold
Success messages: Green
Error messages: Red
Warning messages: Yellow
All user input prompts are now colored for better visibility and consistency. The code compiles successfully.