extracting-config-from-agent-tesla-rat

Extract exfiltration credentials and C2 configuration from Agent Tesla RAT .NET samples.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill extracting-config-from-agent-tesla-rat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: extracting-config-from-agent-tesla-rat
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/malware-analysis/extracting-config-from-agent-tesla-rat
Command: npx skills add https://github.com/xalgord/xalgorix --skill extracting-config-from-agent-tesla-rat

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Agent Tesla hides its configuration behind string encryption, resource obfuscation, and in-memory loaders, so simple string searches on the binary return nothing useful. This Skill guides analysts through deobfuscating the .NET assembly, replaying the embedded decryption routine, and recovering SMTP, FTP, Telegram, and Discord exfiltration settings.

Core Features & Use Cases

  • Automated Config Extraction: A Python script scans the binary for SMTP servers, email addresses, FTP URLs, Telegram bot tokens, Discord webhooks, and Base64-encoded strings.
  • Deobfuscation Workflow: Covers de4dot cleanup, dnSpy/ILSpy decompilation, and memory dumping of fileless second-stage payloads with MegaDumper or pe-sieve.
  • Validation Guidance: Explains how to confirm extracted artifacts (Telegram token format checks, sandbox corroboration via ANY.RUN or CAPE) and avoid false positives from benign .NET apps.
  • Use Case: During incident response, an analyst receives a phishing attachment identified as Agent Tesla and uses this workflow to extract the attacker's SMTP credentials and Telegram bot token, producing IOCs for network blocking.

Quick Start

Analyze the attached Agent Tesla sample and extract its exfiltration configuration including SMTP, FTP, Telegram, and Discord endpoints.

Frequently Asked Questions about extracting-config-from-agent-tesla-rat

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract the configuration from an Agent Tesla sample?

Deobfuscate the .NET assembly with de4dot, decompile it in dnSpy or ILSpy, and locate the string decryption routine. Then replay that routine or run pattern-based extraction for SMTP servers, FTP URLs, Telegram tokens, and Discord webhooks.

Why does string searching an Agent Tesla binary return nothing?

Agent Tesla encrypts its config strings with XOR or SHA256-derived-key AES and stores them in the .NET resource section. You must find and replay the in-binary decryption routine rather than scraping plaintext strings.

How do I analyze Agent Tesla when it uses a fileless loader?

The first-stage dropper decrypts and Assembly.Loads the real payload in memory, so decompiling the dropper yields no config. Dump the unpacked second stage from memory using MegaDumper or pe-sieve, then decompile that dump.

What tools are needed for Agent Tesla config extraction?

You need dnSpy or ILSpy for .NET decompilation, de4dot for deobfuscation, Python 3.9+ with dnlib or pythonnet for automated extraction, and a sandbox like ANY.RUN or CAPE for dynamic validation.

How do I validate extracted Agent Tesla credentials are real?

Validate each artifact by format: check Telegram tokens against the bot<token>/getMe pattern, confirm SMTP host, port, and credentials form a coherent pair, and corroborate with a sandbox capture showing the actual exfiltration connection.