A x86_64 assembly reverse shell
  • Assembly 100%
Find a file
Inknyto 504ea18394 init
2026-03-21 14:16:03 +00:00
netfetch_nyto.asm init 2026-03-21 14:16:03 +00:00
README.md init 2026-03-21 14:16:03 +00:00

NetFetch-Nyto

A lightweight, functional x86_64 assembly reverse shell for Linux. This project demonstrates direct system call invocation, socket programming, and process management in NASM.

Overview

netfetch-nyto is a reverse shell implementation that connects to a predefined IP and port, receives commands, and executes them via /bin/sh -c. Unlike standard shells that pipe stdin, this implementation uses a fork-and-wait model to execute commands received over the socket.

Key Features

  • Direct Syscalls: Uses raw Linux x64 system calls (e.g., sys_socket, sys_connect, sys_fork, sys_execve).
  • Forking Execution: Forks a new process for every command received, allowing the main listener to remain active.
  • Output Redirection: Redirects stdout and stderr of the executed command back to the attacker's socket.
  • Small Footprint: Written entirely in assembly for minimal binary size and no external dependencies (libc-free).

Technical Details

  • Architecture: x86_64
  • Platform: Linux
  • Default Configuration:
    • IP: 127.0.0.1 (Localhost)
    • Port: 1337
  • Workflow:
    1. Creates a TCP socket.
    2. Connects to the attacker's listener.
    3. Enters a loop to read incoming data into a buffer.
    4. forks a child process.
    5. The child redirects output to the socket and calls execve("/bin/sh", ["/bin/sh", "-c", buffer], NULL).
    6. The parent wait4s for the child to finish before accepting the next command.

Prerequisites

You will need the following tools installed:

  • nasm (Netwide Assembler)
  • binutils (for ld linker)
  • netcat (for testing)

Compilation

To assemble and link the source code:

# Assemble the source into an object file
nasm -f elf64 netfetch_nyto.asm -o netfetch_nyto.o

# Link the object file into an executable
ld netfetch_nyto.o -o netfetch_nyto

Usage

1. Start the Listener

On the attacker machine (or a separate terminal), start a listener:

nc -lvp 1337

2. Run the Reverse Shell

On the target machine:

./netfetch_nyto

3. Execute Commands

Once the connection is established, you can type commands into the nc terminal:

whoami
ls -la
uname -a

Security & Ethical Warning

Disclaimer: This project is created for educational purposes and authorized security testing only. Using this software against targets without prior express permission is illegal and unethical. The author is not responsible for any misuse or damage caused by this program.