All Projects → operatorequals → chmod-stego

operatorequals / chmod-stego

Licence: other
A PoC on passing data through UNIX file privilege bits (RWX Triplets)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to chmod-stego

shod
mouse-based window manager that can tile windows inside floating containers
Stars: ✭ 126 (+447.83%)
Mutual labels:  unix
bask
A runner and framework for command-centric Bash scripts.
Stars: ✭ 31 (+34.78%)
Mutual labels:  unix
dotfiles
🍁 dotfiles || plain text configuration files for my linux system
Stars: ✭ 53 (+130.43%)
Mutual labels:  unix
tupai
Tupai is a multi-tasking operating system I wrote for my degree that focuses on safety and design, targeting a variety of platforms.
Stars: ✭ 21 (-8.7%)
Mutual labels:  unix
iota-mqtt-poc
IOTA Proof of Concept, store MQTT messages on the tangle.
Stars: ✭ 40 (+73.91%)
Mutual labels:  poc
Sistem-Programlama
System Programming Course notes
Stars: ✭ 32 (+39.13%)
Mutual labels:  unix
systems-programming-cheat-sheet
Cheat sheet for x86-64 Unix systems programming
Stars: ✭ 328 (+1326.09%)
Mutual labels:  unix
shod-old
hybrid (floating and tiling) tabbed window manager
Stars: ✭ 56 (+143.48%)
Mutual labels:  unix
saram
Get OCR in txt form from an image or pdf extension supporting multiple files from directory using pytesseract with auto rotation for wrong orientation. PYPI:
Stars: ✭ 51 (+121.74%)
Mutual labels:  chmod
Onyx
UNIX-like operating system written in C and C++
Stars: ✭ 52 (+126.09%)
Mutual labels:  unix
netpoll
Package netpoll implements a network poller based on epoll/kqueue.
Stars: ✭ 38 (+65.22%)
Mutual labels:  unix
tabulator
A set of Unix shell command line tools for quick and convenient batch processing of tabular text files (a.k.a., tab-delimited, tsv, csv, or flat data file format) with a header line. Provides column reference by name, automatic delimiter and compression detection for per-line transformations, sql-like group-by operation and relational join.
Stars: ✭ 34 (+47.83%)
Mutual labels:  unix
Android-Task-Injection
Task Hijacking in Android (somebody call it also StrandHogg vulnerability)
Stars: ✭ 52 (+126.09%)
Mutual labels:  poc
unfs3
UNFS3 is a user-space implementation of the NFSv3 server specification.
Stars: ✭ 74 (+221.74%)
Mutual labels:  unix
coreutils
Core utils re-implementation for UNIX/UNIX-like systems written in Rust
Stars: ✭ 96 (+317.39%)
Mutual labels:  unix
BSDCoreUtils
BSD coreutils is a port of many utilities from BSD to Linux and macOS.
Stars: ✭ 30 (+30.43%)
Mutual labels:  unix
command-line-quick-reference
quick reference on command line tools and techniques for the people with limited time
Stars: ✭ 331 (+1339.13%)
Mutual labels:  unix
go-acl
Go library for manipulating ACLs on Windows
Stars: ✭ 97 (+321.74%)
Mutual labels:  chmod
CVE-2020-11651
CVE-2020-11651: Proof of Concept
Stars: ✭ 41 (+78.26%)
Mutual labels:  poc
bsu
🎓Repository for university labs on FAMCS, BSU
Stars: ✭ 91 (+295.65%)
Mutual labels:  unix

chmod-stego

A PoC on passing data through UNIX file privilege numbers (RWX Triplets)

Happy Birthday My Friend!

Those 2 scripts have been written as a Birthday Present to a Beloved Friend. Business with this guy has been the reason I was introduced both to Security and Python and I owe him (and the rest of the group of sec-pythonistas) an awful lot of my personal development.

What was the inspiration

This guy (https://en.wikipedia.org/wiki/Andrew_S._Tanenbaum _) had a weird idea in his awesome book about Operating Systems (https://en.wikipedia.org/wiki/Modern_Operating_Systems). In the Covert Channel Paragraph he described that everything in an OS can be used as covert channel, so all kinds of data breaches are possible. He gave an example about Privilege Bits of a file in UNIX as a covert channel. He concluded that it can be a very massive one as an unlimited number of files can be used to deliver bytes. Even files created in /tmp/ for that reason only.

So what the Hell are those scripts?

Those are 2 python scripts doing just that. A Sender and a Receiver that both understand a minimal protocol of 1-way data transfer using only chmod's on files selected by the user. There is also an auto-synchronization mechanism of the Receiver using ticking!

Usage

Running a ./Sender.py -d sample_files/ "$(cat /etc/passwd | head)" would start transmiting the first 10 lines of your /etc/passwd file through the privilege bits of all files in sample_files/.

Setting the receiver with a ./Receiver.py -d sample_files/ will start gathering the /etc/passwd characters from the privilege bits of all files in sample_files/ and print them on screen (Receiver.py has clean output and can be piped as well).

You can run a watch -n1 "ls -l sample_files/" and see the RWX Triplets dancing!

Triplets Dancing in ASCII rhythm

--help would help

usage: Sender.py [-h] (--directory DIRECTORY | --files [FILES [FILES ...]])
                 [--delay DELAY]
                 message

positional arguments:
  message               Message to be transmitted. Can be the output of a
                        shell command if you use backticks (`) or $()
                        expression in double-quotes (""). Example: ./Sender.py
                        -d sample_files/ "$(cat /etc/passwd | head)"

optional arguments:
  -h, --help            show this help message and exit
  --directory DIRECTORY, -d DIRECTORY
                        Use all files in this directory in the order "ls" returns
                        them (BEWARE: MUST BE WRITABLE)
  --files [FILES [FILES ...]], -f [FILES [FILES ...]]
                        Use the listed files as in the order they are given
  --delay DELAY         Set the delay between the chmod's

Receiver.py's --help is equivalent, but without the MESSAGE and --delay options.

So what?

I can't think of any use cases except in CTFs! Those scripts are intended to be a geeky Bday present. If you find any real usage for them please let me now!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].