Skip to content

Latest commit

 

History

History
877 lines (810 loc) · 49.8 KB

features.md

File metadata and controls

877 lines (810 loc) · 49.8 KB

NightSpectre

⚠️ Legal Disclaimer

This project is intended for educational and authorized security research purposes only.
The developer does not support or condone illegal use of this software.
Please read the full license terms in LICENSE before using or modifying this code.

⌨️ General Information

Note

Handshake LibSodium

sequenceDiagram
   Client->>Server: Generate & Send Client Public Key
   Server->>Client: Send Server Public Key
   Client->>Client: Generate Random Session Key
   Client->>Server: Send Encrypted Session Key (using Server PK)
   
   Note over Client,Server: Secure Channel Established
   
   loop Encrypted Communication
       Server->>Client: Send Encrypted Message
       Note over Client: 1. Receive total length
       Note over Client: 2. Receive nonce
       Note over Client: 3. Receive encrypted data
       Note over Client: 4. Decrypt using session key
       
       Client->>Server: Send Encrypted Response
       Note over Server: 1. Receive total length
       Note over Server: 2. Receive nonce
       Note over Server: 3. Receive encrypted data
       Note over Server: 4. Decrypt using session key
   end
Loading
  • Security Features

    1. Asymmetric Encryption: Uses public/private key pairs for initial key exchange
    2. Symmetric Encryption: Uses shared session key for ongoing communication
    3. Unique Nonce: Each message uses a new random nonce
    4. Message Authentication: Includes MAC for data integrity verification
    5. Secure Key Exchange: Session key is encrypted during transmission
    6. Connection Timeout: Server implements timeout for initial handshake
  • Data Flow

    1. Initial handshake establishes secure channel
    2. Each subsequent message is independently encrypted
    3. Messages include length verification
    4. Each message has integrity checking
    5. Encryption uses libsodium's crypto_box and crypto_secretbox

This system provides:

  • Forward secrecy
  • Message integrity
  • Replay attack protection
  • Man-in-the-middle protection
  • Secure key distribution

Note

Modules Information

The functions that are more likely to be updated/remodeled or are more aggressive are in modules (dlls) that are stored in the registry. When the server tries to execute a function that has not been loaded it warns by means of a MessageBox or a printf depending if we are in CLI or in GUI. The server can send all or a module, in the same way to import them.

As we have said before, they are saved in the registry in unknown positions of windows, the name is made to pass “unnoticed” in the registry.

  1. SpoolSvc.Manager.dll:
  • Path: HKCU\Software\Microsoft\Windows NT\CurrentVersion\Print\PrintServices\MetaData
  • Functions:
    • Port Scanner
    • RDP
  1. SShellExt.Helper.dll:
  • Path: HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Modules\Settings
  • Functions:
    • Chromium Dump
    • Gecko Dump
  1. WUClient.Cache.dll:
  • Path: HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Protocol\Handler\Cache
  • Functions:
    • AvDetection
    • WebCam Viewer

Functionality

sequenceDiagram
   participant Server
   participant Client
   participant Registry

   Note over Server,Registry: Modules Upload Flow
   Server->>Client: dllUpload Command
   
   alt Single DLL
       Server->>Client: Send DLL Name & Size
       Server->>Client: Send DLL Content (chunked)
   else All DLLs
       loop For each DLL
           Server->>Client: Send DLL Name & Size
           Server->>Client: Send DLL Content (chunked)
           Client->>Registry: Store DLL in Registry (chunked)
           Registry-->>Client: Storage Confirmation
           Client->>Server: "OK" Response
       end
   end

   Note over Server,Registry: Modules Import Flow
   Server->>Client: importDll Command
   
   alt Single DLL
       Client->>Registry: Read DLL from Registry
       Client->>Client: Load DLL into Memory
       Client->>Client: Process Relocations & Imports
       Client->>Server: Import Status Response
   else All DLLs
       loop For Each DLL
           Client->>Registry: Read DLL from Registry
           Client->>Client: Load DLL into Memory
           Client->>Client: Process Relocations & Imports
       end
       Client->>Server: Import Status Response
   end
Loading

Note

Subconnections

When operating in GUI mode, certain advanced functions rely on dedicated subconnections. These subconnections are established using predefined, fixed ports, each assigned to a specific module or task. The main purpose of this architecture is to prevent blocking or freezing the main connection, allowing the application to remain fully responsive while executing time-consuming operations like file transfers, port scanning, or real-time streaming.

Each subconnection maintains the same encryption layer as the primary connection, ensuring both security and consistency across all communication channels.

The following ports have been reserved and are used exclusively by these subconnections:
(See full list below.)

  • RDP 48234
  • Scan Network 42185
  • Scan Host 43185
  • CPU Monitor 47328
  • RAM Monitor 65128
  • Remote Explorer 53412
  • Remote WebCam 54000
  • Remote Shell 48109
  • Real Time Audio 39185

Note

Cache & Temporal Cache

We have two types of cache in this RAT, specifically we have a permanent cache and a temporary cache. These two caches have been created in order to optimize and make less noisy the techniques used in the software.

Persistent

The persistent cache is designed to optimize performance and reduce redundant operations. It is used in two specific scenarios and is stored as separate binary files, each following a defined C-style structure to enable fast retrieval when needed:

  • 📍 Geolocation Data
    Within the GeoLoc Execution feature (accessible via the General Functions menu in the GUI), a world map is displayed. When the operator selects a location—be it by country, region, city, or ISP—a red marker is placed on the map for visual reference.
    These location lookups are obtained through external web requests. To prevent repeated queries and unnecessary traffic, the results are cached persistently and reused for future executions.

  • 🔍 Port Scan Results
    Custom port scans can be time-consuming. To avoid repeating the same scans across sessions, the results are cached in the same structured format. When a previous scan is detected, the GUI will reuse the saved data, unless explicitly cleared or overridden by the user.

🧠 Temporary Cache

The temporary cache is designed to store the output of functions whose results are not expected to change frequently. This helps avoid redundant executions while still allowing access to previously gathered data.

The following structure defines the functions cached temporarily:

typedef struct {
   char scannet[2048];                // CLI / GUI - Network Scan Results
   char sysinfo[1024];                 // CLI / GUI - System Information
  char checkAv[1024];               // CLI / GUI - Anti-Virus Check
  char *wifiPasswords;                 // CLI / GUI - Stored WiFi Credentials
  char persistence[50];             // Admin-level Persistence Status
  char lowpersistence[50];         // Non-admin Persistence Status
   char CookiesPasswords[MAX_PATH];           // CLI / GUI - Chromium Cookies Dump
  char DecryptedPasswords[MAX_PATH];         // CLI / GUI - Chromium Passwords Decrypted
  char CookiesPasswordsGecko[MAX_PATH];      // CLI / GUI - Gecko Cookies Dump
   char DecryptedPasswordsGecko[MAX_PATH];    // CLI / GUI - Gecko Passwords Decrypted
} Commands;

Note

CLI & GUI Communication System Documentation

📝 Overview

This describes the bidirectional communication mechanism between the Command Line Interface (CLI) and the Graphical User Interface (GUI) components. The system utilizes shared memory buffers in conjunction with Windows synchronization primitives to ensure reliable, efficient, and thread-safe message passing.


🏗️ System Architecture
📦 Shared Memory Buffers

The communication flow is based on two primary shared memory buffers:

  1. Command Buffer

    • Transports commands from GUI → CLI
    • Fixed size of 256 bytes
    • Secured via critical sections
    • Includes a command presence flag
  2. Output Buffer

    • Transmits responses from CLI → GUI
    • Size: 8196 bytes
    • Also protected by critical sections
    • Includes a data availability flag

⛓ Synchronization Mechanisms
🔔 Event-Based Signaling

Windows event handles are used to synchronize operations:

  • hExplorerEvent: Triggers file system operations
  • hCommandEvent: Executes general-purpose commands
  • hNetworkEvent: Coordinates network-related tasks
  • hShellEvent: Signals shell command processing
📚 Specialized Buffers

Distinct buffer instances are used to handle various communication channels:

  • networkAuxBuffer: Network-specific tasks
  • shellCmdBuffer: Input for shell commands
  • cmdBuffer: General-purpose command buffer
  • shellBuffer: Output stream for shell sessions
  • outBuffer: Standard command output

🔄 Communication Flow
  • 🟦 GUI → CLI
    1. Acquire the relevant critical section
    2. Write command into the Command Buffer
    3. Set the command flag
    4. Signal the corresponding event handle
    5. Release the critical section
  • 🟥 CLI → GUI
    1. Wait for the event signal
    2. Acquire the relevant critical section
    3. Process the received command
    4. Write the output to the Output Buffer
    5. Signal the completion
    6. Release the critical section

📡 Advanced Features
📤 Handling Large Output
  • Responses exceeding buffer limits are chunked (4,098 bytes per chunk)
  • Each chunk is tagged for reassembly
  • Special flags mark the end of transmission
  • The GUI reconstructs the full response automatically
💻 Shell Mode
  • Uses dedicated shell buffers for input and output
  • Supports continuous command streams
  • Enables real-time output display in the GUI

🛡️ Safety & Reliability
🧵 Thread Safety
  • All shared memory access is protected with critical sections
  • Event-based signaling avoids race conditions
  • Atomic flags indicate data availability or consumption
  • Prevents buffer overflows and undefined access
⚠️ Error Handling
  • All buffers perform capacity checks
  • Timeouts detect communication lags
  • Failed operations trigger automatic recovery
  • Handles resource cleanup gracefully on both ends

⚙️ Initialization Process
🚀 Startup Sequence
  1. Initialize critical sections
  2. Create synchronization events
  3. Allocate and clear memory buffers
  4. Register CLI/GUI message handlers

📌 Best Practices
✅ Usage Guidelines
  • Always enter and leave critical sections properly
  • Validate buffer size before writing
  • Implement timeouts to detect st

Warning

Browser ABE (App-Bound Encryption) Key Extraction Documentation

Overview

The ABE key extraction system uses a unique approach to obtain encryption keys from major Chromium-based browsers (Chrome, Brave, Edge) by leveraging their own ElevationService.

Architecture
sequenceDiagram
    participant Main as Main Process
    participant Helper as Helper Process
    participant ElevationSvc as Browser ElevationService
    participant Registry as Windows Registry
    participant LocalState as Local State File
    Main->>Main: Create Named Pipe
    Main->>Helper: Create Copy & Launch with "abe_only"
    Helper->>LocalState: Read Encrypted Key
    Helper->>ElevationSvc: Request Decryption
    ElevationSvc->>Registry: Access System Keys
    ElevationSvc-->>Helper: Return Decrypted Key
    Helper->>Main: Send Key via Named Pipe
    Main->>Main: Process Key & Cleanup
Loading
Components
1. Main Process
  • Creates named pipe for IPC
  • Manages helper process lifecycle
  • Receives decrypted keys
  • Handles cleanup
BOOL LaunchChildAndGetKey(const char* browserType, unsigned char* outKey) {
    // Create unique pipe name
    // Launch helper process
    // Receive key through pipe
    // Cleanup resources
}
2. Helper Process
  • Runs with "abe_only" parameter
  • Interfaces with browser's ElevationService
  • Extracts and decrypts keys
  • Communicates back via pipe
int ABEDecryption(int argc, char const* argv[]) {
    if (argc > 3 && strcmp(argv[1], "abe_only") == 0) {
        // Helper process mode
        DecryptBrowser(argv[2], key, FALSE);
        // Send key through pipe
    }
}
3. Browser Interaction
  • Uses COM interfaces
  • Leverages browser's own decryption services
  • Handles multiple browser types

Security Features

  1. Process Isolation

    • Helper runs separately
    • Limited lifetime
    • Automatic cleanup
  2. Communication Security

    • Named pipes for IPC
    • Process-specific naming
    • Timeout handling
  3. Resource Management

    • Automatic file cleanup
    • Handle management
    • Error recovery
Integration Modes
DLL Mode
#ifdef BUILD_DLL
    ABEHandler(argc, argv);
#else
    ABEDecryption(argc, argv);
#endif
Flow Sequence
  1. Initialization
    • Create named pipe
    • Setup communication channel
  2. Helper Process
    • Copy executable
    • Launch with parameters
    • Connect to pipe
  3. Key Extraction
    • Read Local State
    • Interface with ElevationService
    • Decrypt key
  4. Communication
    • Send key through pipe
    • Verify receipt
  5. Cleanup
    • Remove helper copy
    • Close handles
    • Clean resources

This architecture ensures reliable key extraction while maintaining security and proper resource management.

📰 News Windows

1. Encrypted Communications (End-to-End) and Secure Key Exchange

  • Implemented end-to-end encrypted communication with secure key exchange for enhanced security during data transmission.

2. Dump All Function

  • Now supports the Dump All function, allowing the extraction of:
    • Cookies & Passwords for Gecko and Chromium browsers.
    • Information about installed software.
    • Wi-Fi passwords.
    • Active processes in execution.
    • Detect and steal exodus wallet
    • Detect and steal monero wallet

3. Custom Lightweight RDP

  • Developed a custom, lightweight version of RDP (Remote Desktop Protocol) for seamless and secure remote access (comunication not chipred).

4. Autojoin Commands Function

  • Introduced an Autojoin feature that automatically executes commands upon connection.

📰 News Windows

1. Video & Audio Recording Functions (Old and Outdated)

  • Introduced new functions to record video and audio:
    • 10-second video recording.
    • 10-second audio recording.

📰 News Description

Feature Description Usage
Monero .keys Stealer Added a new function to detect the installation of Monero and download the .keys file for private key extraction. In case there is the use of monero, this function comes in handy to audit how complex are the passwords used, with these files we may be able (or not) to crack the wallet key.
Exodus.seco Stealer Added support for Exodus.seco files. These can now be cracked using Hashcat to recover and steal sensitive information. In case there is the use of exodus, this function as in monero comes in handy to audit how complex are the passwords used, with these files we may be able (or not) to crack the wallet key.
Clipboard Crypto Wallet Change New function detects when a cryptocurrency wallet address (ETH, BTC, XRP, LTC) is copied to the clipboard and automatically replaces it with a different wallet address. This is useful for us to see how well the addresses to which transactions are made are checked.
Enhanced Windows Shell Improved PowerShell shell with new one-liner commands for enhanced system control and functionality. Precious powershell
AutoJoin Commands Including function for automatic execution of functions as the client connects. There are commands required for uploading and importing modules, it can be a vacancy to run automatically.

🔐 Architecture & Advanced Features

This section outlines the internal structure, security measures, execution logic, and advanced session control tools included in the system.


🔑 Secure Communication

Feature Description
Key Exchange Custom handshake mechanism for secure key exchange using libsodium.
End-to-End Encryption All communication is encrypted using AES-256 after the handshake, ensuring complete data privacy.

🧩 Modular Client System

Module Description
Dynamic DLL System Some key client functionalities are isolated in DLLs, which can be updated remotely from the server without recompiling the main binary.
Privilege Management The client uses Named Pipes to avoid running multiple instances at the same privilege level. If both admin and user-level instances are launched, the system retains the admin version and terminates the user one.
ABE Decryption Used for decrypting protected data from browsers. Requires administrator privileges to move binaries into browser-protected directories.

🌍 Session Filtering & Geolocation

Feature Description
Advanced Filtering Sessions can be filtered by country, region, city, ISP, public IP address and any parameter of infromation that the server has.
Interactive World Map (GUI) The GUI includes a world map. Selecting a country displays a red marker, with additional indicators for cities and regions. ISP locations are shown as geo-coordinate points on the map.
Group Execution Commands can be executed across all connected sessions or filtered subsets based on geolocation.

⚙️ Automation & Control

Feature Description
Default Actions per Session Predefined functions can be automatically executed when a new session connects.
Temporary Logs Temporary logs are created for each session, tracking executed functions. These logs are deleted automatically when the app closes.
Command Caching System Frequently used commands are cached to avoid redundant execution. Add "nocache" in CLI or press the "No Cache" button in the GUI to force re-execution.
Persistent Session Monitor A dedicated monitor thread observes all connections. If a client disconnects, it automatically cleans and releases resources.

📁 Structured Data Storage

All session-related data is stored using a well-organized structure for quick access and identification:

DATA
├───192.168.1.183
│   └───DESKTOP-JIA3EJG
│       │   SystemInformation.json
│       │   wifi_credentials.txt
│       │   
│       ├───chromium
│       │   │   cookies-extracted.txt
│       │   │   passwd-extracted.txt
│       │   │   
│       │   ├───brave
│       │   │       abe_hex_key.txt
│       │   │       Cookies
│       │   │       Login Data
│       │   │       oscrypt_hex_key.txt
│       │   │       
│       │   ├───edge
│       │   │       abe_hex_key.txt
│       │   │       Cookies
│       │   │       Login Data
│       │   │       oscrypt_hex_key.txt
│       │   │       
│       │   └───google
│       │           abe_hex_key.txt
│       │
│       └───gecko
│
└───192.168.1.18
    └───DESKTOP-3R536MC
        │   AvDetection.json
        │   importantdocument.pdf
        │   screenshot-192.168.1.18-0.bmp
        │
        ├───chromium
        │   │   cookies-extracted.txt
        │   │   passwd-extracted.txt
        │   │
        │   ├───brave
        │   │       abe_hex_key.txt
        │   │       Cookies
        │   │       Login Data
        │   │       oscrypt_hex_key.txt
        │   │
        │   ├───edge
        │   │       abe_hex_key.txt
        │   │       Cookies
        │   │       Login Data
        │   │       oscrypt_hex_key.txt
        │   │
        │   └───google
        │           abe_hex_key.txt
        │           Cookies
        │           Login Data
        │           oscrypt_hex_key.txt
        │
        └───gecko

This includes logs, key dumps, screenshots, extracted data, and configuration files.

Session Handler

This RAT software is made from scratch created in C/C++, apart from being a RAT, it can be categorized as C&C and spyware. It should be noted that none of the functions available in this software are executed automatically, they ALWAYS have to be executed by the server driver. This software does not take actions automatically-

Before entering a session we have the following commands to manage them:

Command Description Example
sessions Show active sessions sessions
session id Connect to a session session 0
default=cmd1,cmd 2,cmd3 Execute 1 or more commands as default (when the connection is made) default=passwdDump,dumpGecko,check
exec command Execute commands in ALL of the victims exec passwdDump,dumpGecko
exec geo Execute a commmand in all victims in a specific geo zone (country/city/region/isp) (This function use threads) exec geo
search Allows to search a session by any param, the session store the PCName, country, region, city and ISP search AT&T
gui Runs the server's graphical interface if not already done at the time of execution. gui
q | exit Close server without closing malwares in victims q
q -y |exit Terminate all connections (close victim binary) exit -y

Specific command usage

Note

Default command

As I said before this command allows us to execute default functions as a connection is established. It is quite simple I provide some examples:

Example 1: default=passwdDump,dumpGecko,lowpersistence Example 2: default=av,screenshot,persistence

We do not have all the commands available as if it were a session but we have the following available

= = = = = = = = Available Default Commands = = = = = = = =

passwdDump
dumpGecko
sysinfo
monero
av
persistence
lowpersistence block
unblock
screenshot
dumpAll

Warning

Exec command

This command (outside a session) allows us to execute one or various commands on all active clients on the server.

Example 1: exec dumpGecko Example 2: exec dumpAll,screenshot,lowpersistence

= = = = = = = = Available Global Commands = = = = = = = =

passwdDump
dumpGecko
sysinfo
monero
av
persistence
lowpersistence block
unblock
screenshot
dumpAll

Warning

Exec geo command

This command is very similar to the previous one, but allows us to select a GEO zone to execute commands, such as the following:

  • Country (country) (default)
  • City (city)
  • Region (region)
  • ISP (isp)

Example 1: exec geo Example 2: exec geo city Example 3: exec geo region Example 4: exec geo isp

When we use these commands and select one of the locations or ISPs we get another prompt to execute a command. We can use help to see what commands we have available

Note

Search command

This command allows to search a session by any parameter that we have on session information like the PC Name, country, region, city and ISP

Example: search AT&T

Session Commands

When we enter into a session we have several functions to use, mainly we will be guided by the help command that shows us the available commands.

Command Description                                                                                                                                       Example                                                                                                                    
shell Spawn a powershell (dont remember old commands, oneliners better) shell
download Download any file on the remote system download C:\users\pentest\Desktop\passwords.kdbx
upload Upload any file to the remote system upload enumeration.ps1
exec Execute a command without entering shell mode exec whoami
sysinfo Show info from system target (RAM memory/Processor type/PC Name/Main disk space/Free space on the main disk) sysinfo
lowpersistence Set persistence without admin permissions (registry based) lowpersistence
persistence Set persistence with admin permissions (service based) persistence
check Check permissisons on remote system check
block Block mouse & keyboard input (admin rights needed) block
unblock Unblock mouse & keyboard input (admin rights needed) unlock
passwdDump     Dump passwords & cookies in chromium browsers (Edge/Chrome/Brave) passwdDump
dumpGecko Dump passwords & cookies in gecko browsers (Fifrefox/LibreWolf/Waterfox) dumpGecko
wifiDump Dump in text plain the wifi passwords saved wifiDump
processDump Dump all proces in execution (saved with timestamp) processDump
softwareDump Dump installed software in computer (saved with timestamp) softwareDump
dumpAll Dump passwords & cookies from chromium and gecko browsers, processes in execution, software installed and wifi saved passwords dumpAll
lcd Change local directory lcd ../../
lpwd Print local working directory lpwd
lls Show files on local directory lls
display         Display a message box with a custom message                                                                                                       display ive got all your wallets and i just transfer all the money, if u wanna recover it u need to pay for a rescue...
screenshot Take a screenshot of the remote PC screenshot
record Record a audio of x seconds from the mic of the remote host record 25
scannet Show with ARP Scan the devices on the net of the victim scannet
scanhost       Scan the ports of a host in the remote net, for this we've need to execute first scannet. scanhost 192.168.1.45
monero         Detect monero instalation and dump .keys file monero
exodus         Detect exodus instalation and dump .seco file exodus
av Detect installed security software (WMI Based) av
dllUpload Upload to the victim registry the dlls to use some functions. We can specify one dll to upload (ShellExt.Helper/SpoolSvc.Manager/WUClient.Cache) (This function use threads) dllUpload
importDll Preload a dll, we can specify one or just send importDll that will preload all. importDll
srdp Start a RDP session on the remote computer (This function use threads) srdp
checkDlls This command allows us to know the status of the modules, if they are found in the registry and if they are imported into memory. checkDlls
exodus Detects the wallet path via common paths and downloads the .seco files of the wallets exodus
monero Detects the wallet location via registry and downloads .keys files monero
wifiDump Extracts passwords for WiFi networks stored on the device. wifiDump
processDump Dump all the active processes in the remote system processDump
softwareDump Dump the software installed with his version in the remote system softwareDump
webcam Opens a window with the camera of the client connected webcam
rta Listen in real time the mic of the client connected this can be implemented with "webcam" rta
explorer Opens a GUI remote explorer to browse the files of the client connected, with the possibility of download and upload files, also create a folder explorer
cpu This is used for a GUI session control pannel, monitorice the usage of the CPU cpu
ram This is used for a GUI session control pannel, monitorice the usage of the RAM ram
clearCache Clear the cache of the locations for Geo Location execution and the ports of the hosts clearCache
idle This command is used automatically for GUI to detect is the session is still alive idle
reconnect Force the client to reconnect. reconnect
uninstall Uninstall all, the persistence, binaries, registry entries, etc. uninstall
q | exit Exit the connection (without close the victim binary) q
close Close the connection and close the victim binary close

DLL Commands

  • We have some commands that requires DLLs that we have on dist\server\dll WE CAN NOT CHANGE THE NAME OF THE DLLs this is because the server searchs with an array with the names, also the array of the server is in order with the client, if we modify the names we need to match the old names order with the new, this can be done like this

Server

Server DLL array

Client

Client DLL Array

  • Before we can execute a command that requires a DLL we need to import them first, the import command will fail if we dont execute first dllUpload. This command recive the dlls from the server and load it into client registry.
Modules Information

Important

DLL Initialize

Like i said, first of all upload the Dlls, when we enter the connection it will show up a report if the DLLs are in the registry, are in memory, etc. If we modify some files that are in the DLLs we need to reupload

First: dllUpload Second: importDll

  • The diferent DLLs got this files:
    1. SpoolSvc.Manager:
      • ./src/windows/C/portScanner.c
      • ./src/windows/C/rdp.c
      • ./src/windows/C/sysInfoWin.c
    2. ShellExt.Helper:
      • ./src/windows/C/StealModChromium.c
        • stealCookiesChromium.c
        • stealModABE.c
      • ./src/windows/C/StealModGecko.c
    3. WUClient.Cache:
      • ./src/windows/C/AvDetection.c

We can modify or add modules to this dlls, but to do this we need to add this prefix in the fucntion and also reupload them, f we dont add this the main .exe could not find the function name inside the dll:

  • Prefix: DLL_API - This is defined as __declspec(dllexport)
  • Example: DLL_API int strtDmp(SOCKET conn, unsigned char session_key[32U]){}

If we need to use a function of the main .exe inside a file of the dll we need to do this to find the function:

  1. Add a typedef in the file that would be in the dll:
 // Typedef inside file of dll
 typedef int (*SecureSendFunc)(SOCKET conn, unsigned char session_key[32U], const char* data, int len);
 
 // Real function delcaration in main .exe file
 DLL_API int secure_send(SOCKET conn, unsigned char session_key[crypto_secretbox_KEYBYTES], const char* data, int len); 	 
  1. Find the function and use it:
 HMODULE hExe = GetModuleHandle(NULL); 
 SecureSendFunc secure_send = (SecureSendFunc)GetProcAddress(hExe, "secure_send");
 secure_send(conn, session_key, Full_Dcpd_PwrD, strlen(Full_Dcpd_PwrD));

Important

Import DLL

This command has the ability to import only one of the dlls upload or import all to memory

Import all: importDll Import one: importDll ShellExt.Helper

General Commands

Note

Download

For better accuracy it is better to use the full path, but you can use the dynamic path taking into account the position of the client, if you execute a “cd” in the shell, the dynamic path changes.

Example 1: download passwords.kdbx Example 2: download C:\Users\user\Desktop\passwords.kdbx

Note

Upload

This command alwais upload the file in the position that we are if we change it with something like: exec cd C:\Users\user\AppData\Local\Temp

Example 1: upload enumeration.ps1 Example 2: upload D:\Scripts\Windows\enumeration.ps1

Same as download, we've got a progress bar, if this get stuck we can relaunch server.

Note

Exec

This command allows us to execute a command without enter to shell mode, this can be good for example to know if "x" file is on the directory that we are for upload function.

Example 1: exec ls Example 2: exec whoami /priv

  • The executed commands are forgotten, we cannot do this:
    exec $p=whoami
    exec $p 
  • But we can use oneliners like
    exec $p=whoami; $p

Note

Display

Shows up a Message Box with the message selected, i added this function starting my developent but i dont find it very useful, it can be deleted or ignored.

Example: display hello

Caution

Record

This command record audio from the victims mic, save it into a file in temp, send it over the network and then delete the file. In this command we can specify the time to record, by default we have 10s

Record 10s audio: record Record 20s audio: record 20

This file is saved on the server with a counter so as not to overwrite any audio files.

  • record-voice-IP-COUNTER.wav

Note

Scannet

With an ARPScan detect the devices in the network

Example: scannet

The output of this command will be saved in a cache memory, then with the scanhost command we can scan a detected host.

Note

Scanhost

After make a ARPScan (scannet) we can scan the ports of a host, this functions take a little of time but the ports are sended when its detected so we can se how it is going.

Example: scanhost 192.168.1.15

We also can ask to se the aviable ips with this command

Example: scanhost show

This will show up the aviable ips saved in the cached memory

The other commands are so easy to use and dont require any parameter.