Network Auditing & Concurrent Systems

Multi-Threaded SSH Credential Auditor

An automated network utility designed to stress-test SSH password policies using concurrent threading loops.

Python pxssh Multi-Threading Concurrency Controls

Project Overview

The Multi-Threaded SSH Credential Auditor is a command-line administration tool used to audit the robustness of system access controls. By automating SSH login handshakes, it allows administrators to parse dictionary files and evaluate whether network nodes conform to complex password policies or remain vulnerable to basic credential-guessing tactics.

By combining session-handling classes with active thread locking, the tool maintains low overhead while executing multiple network handshakes concurrently.

Technical Architecture & Concurrency

To prevent the script from dropping packets, crashing local sockets, or triggering aggressive firewalls, the software flow is strictly managed using semaphores:

CLI Params Loaded
Bounded Semaphore Lock
Thread Spawn (Max 5)
pxssh Authentication Handshake
Thread Lock Released

Key Engineering Principles

Key Python Implementation

Below is the modular execution block showing how the tool synchronizes thread launches and manages locks while iterating through a wordlist:

# Initiating connection pools and executing locked threads
fn = open(passwdFile, 'r')

for line in fn.readlines():
    if Found:
        print "[*] Exiting: Password Found"
        exit(0)
    if Fails > 5:
        print "[!] Exiting: Too Many Socket Timeouts"
        exit(0)
        
    # Acquire a semaphore token before spawning a new thread
    connection_lock.acquire()

    password = line.strip('\r').strip('\n')
    print "[-] Testing: " + str(password)
    
    # Spawn and start thread execution
    t = Thread(target=connect, args=(host, user, password, True))
    t.start()

Defensive Remediation & Hardening

This audit script highlights the inherent weaknesses of password-based SSH authentication. To secure enterprise systems against high-speed automated credential validation, the following defensive strategies should be deployed: