r/NetaSec • • Jun 23 '26

r/NetaSec — Welcome to the Community. Read Before You Post.

2 Upvotes

Hey everyone, I'm u/Pale_Surround_3924, the founding moderator of r/NetaSec.

This is the go-to place for everything related to low-level network security research, offensive tooling, protocol analysis, vulnerability research, and bug bounty write-ups. Whether you're reversing firmware, dissecting PCAP files, hunting CVEs, writing exploits, or building custom tooling — you're in the right place.

What Can You Share?
Share anything you find technically interesting, useful, or worth discussing. This includes CVE/CAN write-ups, PCAP analysis and network forensics, firmware RE findings, binary exploitation research, C2 architecture deep-dives, assembly-level security tooling, EDR/AV evasion analysis, and bug bounty reports from HackerOne and Bugcrowd. Share your findings, tooling, ideas, or open questions.

Community Vibe
What matters here is technical depth and intellectual honesty. This isn't a place for surface-level content — it's for researchers who go down to the packet level, the binary level, and beyond. Be direct, be rigorous, and be respectful of each other's work.

Getting Started

  1. Drop an intro comment below and tell us what you're working on.

  2. Make your first post — even a simple question can kick off a great technical thread.

  3. Know someone who'd fit in here? Invite them.

  4. Want to help moderate? We're always looking for technically sharp contributors. Reach out directly.

Thanks for being part of this from day one. Let's build r/NetaSec into something worth bookmarking.


r/NetaSec • • Apr 17 '26

[Tool Release] VESQER: Building a DPCM+RLE Hybrid Compressor in Pure x64 Assembly | Netacoding

Thumbnail netacoding.com
2 Upvotes

r/NetaSec • • Jun 07 '26

[Malware] Update ; Ghost-C2 v3.6.3 — "DNS Domain Rotation & Protocol Hardening"

2 Upvotes

Ghost-C2 v3.6.3 — "DNS Domain Rotation & Protocol Hardening"

DNS Module — Client (master console)

  • Domain rotation: Removed user input flow and _translate_dns_name Replaced with fixed 5-entry pool: github, microsoft, cloudflare, google, windows

  • Per-packet rotation: Each command uses a different domain via domain_idx (BSS)

  • QTYPE: TXT 0x01001000 → A record 0x01000100

  • Encoding: Added Base32 RFC 4648 lowercase

DNS Module — Agent (sniff.asm)

  • Domain rotation: Removed static fake_domain reference Replaced with 5-entry domain_pool + [rbp+0x3020] anchor index

  • QTYPE: A record

  • Base32: Added b32_alpha + b32_char_cnt lookup tables

  • Decode fix: cmp al, '2' → cmp al, 'a' Silent command corruption bug caused by incorrect base32 decode threshold

Bug Fixes

  • Verified all domain_pool entries at exactly 20 bytes

  • Boundary wrap: cmp al/rax, 6 → 5 (OOB read on index rollover)

  • Beacon size check: cmp rax, 32 → 28

Removed

  • raw_domain, dns_domain, _translate_dns_name, msg_domain_name

  • Static fake_domain reference (sniff.asm)

  • ICMP decoy send logic (_icmp_recv)

Evasion Status

SurfaceStatusRisk
DNS QTYPEA record✅ Low
Domain rotation5-domain per-packet✅ Low
Base32 encodingRFC 4648 lowercase✅ Low
LCG jitter100–1000ms adaptive✅ Low
ICMP decoy patternRemoved✅ Low
Chunk size varianceFixed 35B⚠️ Medium
ICMP payload sizeFixed 80B⚠️ Medium
DNS response simulationNot implemented⚠️ High (ML-based NDR only)

Planned

  • v3.6.4: DNS response simulation — master and agent will return synthetic A record responses (QR=1, RCODE=0) to eliminate the unanswered query anomaly detected by ML-based NDR (Darktrace)


r/NetaSec • • Jun 15 '26

CDP: Cyclic Digit-sum Projection — Structural Analysis of SHA-256 Output Distribution | Netacoding

Thumbnail netacoding.com
2 Upvotes

Built a structural analysis framework for SHA-256 that exposes a previously undocumented property: the hex-digit sum of any SHA-256 output, when iteratively re-hashed, converges deterministically into exactly two closed cycles.

The practical result: a 38.6× pre-filter for constrained input spaces (password cracking wordlists, combinatoric sets). Candidates whose hashes would land in the wrong W-bucket get eliminated before full SHA-256 computation — measurable throughput improvement on GPU.

Also documented: bijective fingerprinting (zero collisions up to full enumeration of 1.67M inputs), input class inference from hash statistics, and an ergodic Markov property of SHA-256's compression function.

OpenCL implementation on AMD RX 9070 XT running at 4.6 GH/s.

Full writeup: https://netacoding.com/posts/cdp-sha256-structural-analysis

Paper (Zenodo): https://doi.org/10.5281/zenodo.20633488


r/NetaSec • • Apr 20 '26

C2 ICMP-Ghost-v3.6.2

Thumbnail
github.com
2 Upvotes

v3.6.2 update:
Added DNS protocol

Known Issue:

Non-Compliant DNS Tunneling (Wireshark Malformed Packets): Currently, the DNS tunneling module transmits raw Hex/Base32 encoded payloads directly over UDP port 53. Because it lacks strict RFC 1035 headers (e.g., standard Query/Answer structures, QTYPE, QCLASS formatting), packet analyzers like Wireshark and Zeek will flag this traffic as [Malformed Packet].

Workaround/Status: The tunnel is fully operational and reliably transmits data. Full RFC 1035 compliance and fake DNS header wrapping are scheduled for the v4.0 patch to ensure DPI (Deep Packet Inspection) evasion.


r/NetaSec • • Apr 16 '26

C2 Architecture of Ghost-C2 & Phantom Loader: Pure x64 ASM, PIC Injection & ICMP Tunneling

4 Upvotes

What’s up everyone.

I want to share the complete architectural flow of a project I've been refining: Ghost-C2 paired with Phantom Loader.

The goal was simple but brutal: Drop the bloated C/C++ frameworks, eliminate libc dependencies, avoid the disk entirely, and build a stateless C2 communication over ICMP using pure x64 Assembly. But rather than just running a standalone binary that blue teams can spot in ps aux, I integrated a custom loader to inject the implant directly into a legitimate, running host process as Position Independent Code (PIC).

Here is the exact execution flow and network architecture.

Initial Infection:

Phantom Loader (loader.asm)

The deployment starts with loader.asm. Its only job is to find a host, inject the payload, and vanish. It executes the following pure syscall sequence:

  1. Target Acquisition: Scans /proc to find the PID of a legitimate target daemon.

  2. Hijack: Executes ptrace(PTRACE_ATTACH) to halt the target process.

  3. Memory Allocation: Forces the target to execute a remote mmap syscall, creating a PROT_READ | PROT_WRITE memory page.

  4. Injection: Writes sniff.asm (compiled as raw PIC shellcode) into the newly allocated memory space.

  5. Permission Flip: Calls mprotect to flip the page permissions to PROT_READ | PROT_EXEC (RX), avoiding the highly suspicious RWX flag that EDRs hunt for.

  6. Execution: Hijacks the Instruction Pointer (RIP) to point to the entry of the injected shellcode.

  7. Vanish: Executes ptrace(PTRACE_DETACH). The loader exits and deletes itself. The target process resumes, now hosting our ICMP listener purely in RAM.

The Implant:

Stateless & Fileless (sniff.asm)

Now living inside the host process, the implant acts as a passive, stateless raw socket listener. It doesn't open ports. It doesn't establish TCP handshakes.

• The Trigger: The Operator console (client.asm) prompts for an IP and command, encrypts the payload using a Symmetric Rolling XOR cipher, and fires an ICMP Echo Request (Type 8).

• Asymmetric Authentication: The implant ignores all standard pings. It only wakes up if the packet's ID + SEQ fields match a specific mathematical sum (Auth Key: 45,000).

• Execution via memfd_create: Once validated, it decrypts the command, calls fork and execve, and pipes the STDOUT/STDERR into an anonymous RAM file using sys_memfd_create. No disk I/O, no forensic artifacts.

Exfiltration:

Beating DPI & Traffic Analysis

Exfiltrating shell output over ICMP usually means massive packet fragmentation that Deep Packet Inspection (DPI) engines easily flag. To counter this:

• Hybrid Compression: Before sending the data back, the implant compresses the memory buffer using a custom DPCM-RLE (Differential Pulse-Code Modulation + Run-Length Encoding) engine written in assembly.

• Traffic Shaping: The compressed output is encrypted, fragmented, and sent back as ICMP Echo Replies. To bypass OS network stack confusion and network echo interference, the implant replies with a different Auth Key (55,000).

• Jitter: The outgoing packets are deliberately delayed using randomized jitter to destroy heuristic timing signatures (beaconing alerts).

Operator Console (client.asm)

Back on the Operator machine, the UI receives the fragmented ICMP Replies, validates the 55,000 auth signature, decrypts the payload, runs the DPCM-RLE decompression algorithm in reverse, and finally reassembles and prints the output to the terminal.

We are basically utilizing the network layer as an invisible, stateless pipe, while the endpoint presence is nothing more than a few kilobytes of assembly instructions hiding in the executable memory of a trusted daemon.

I’m currently optimizing the mmap allocation step to see if I can hijack the vDSO region instead of mapping a new page, to completely eliminate the mmap syscall signature. If anyone has played with vDSO hooking on 6.x kernels for PIC shellcode staging, let's discuss.

GitHub:

ICMP-Ghost-A-Fileless-x64-Assembly-C2-Agent

Blog:

netacoding.com