Welcome To My Raspberry Pi Site!

Who Am I?

Hey! I'm a math and physics major who just happens to be interested in coding close to hardware and cyber security! Occasionally I experiment with code and some work of mine can be found on my GitHub profile where you can find an entire 32 bit x86 monolithic operating system kernel implementation using the languages C and x86 Assembly! Isn't that cool?

Rest assured to find kernel related topics all around my persona. Reverse engineering or the process of reconstructing how a binary functions and is built in a more technical manner is unironically fun and educational. Hence why I advice you to check it out for yourself!

I enjoy doing this in my spare time and incorporate the by this learned skills for example while debugging a live operating system during development. Or you could simply load a known malicious binary into Ghidra or an equivalent tool to start inpsecting binaries statically yourself. (Don't dynamically analyze malware without knowing what you're doing! That means running them and seeing what is happening up close.)

Media Server

Live Kernel Development Status

-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                                7             56              7            444
Assembly                         4             72              3            321
C/C++ Header                     7             45              0            252
make                             1              2              3             38
Markdown                         1             10              0             35
Fortran 77                       1              5              0             25
Linker Script                    1              2              0             24
-------------------------------------------------------------------------------
SUM:                            22            192             13           1139
-------------------------------------------------------------------------------
(lines of code written)
Minecraft Server This web site is hosted on a Raspberry Pi 4 using Nginx. It also serves a cool and unique minecraft survival multiplayer server! Why is it special? Well...

besides fully functioning support for all platforms for Bedrock and Java incluing older versions, an in-game economy system in tandem with graphical shop and auction house functionality via chat commands, dedicated farming worlds, ranks, a

DONATION STORE
which automatically handles your transaction and the in-game server rewards for you theres far more! Like an anti-cheat, a spawn, dynamic new in game mechanics and experienced IT staff!

You can join on java by simply typing my domain "myfaultsys.com" into the server name field. On bedrock its important to specify the port 26667 together with the domain name. That means you have to type in "myfaultsys.com:26667" into the server name field.

This is because the standard language the server software understands is java and for the bedrock speaking machines to cleanly be routed to the correct place on the server where it expects this traffic to translate it into the other kind is just that one.

Security - MyFaultSys

I HACKED MYSELF!

Piracy in olden and todays modern days poses a threat tousers via malware distribution. Regardless of morals on piracy users are at risk of losing complete control over their entire digital persona. Malware authors can simply inject malicious payloads into any binary an end-user may execute with naive trust. This trust is often abused. Authors know once a maliciously crafted binary is downloaded it is likely to be executes since users rarely inspect a programs machine code and hence infect themselves.

To simulate a real attack chain I built a complete global command and control server infrastructure:
I used a total of three different machines. The first machine 'A' is a regular media server which was hijacked to serve a malicious install script and binary. Machine 'B' was a macbook running kali linux and finally machine 'C' was a victim machine. The macbook running linux functioned as a commmand and control server handling all reverse-shell backdoors to all infected machines simultaneously. The victim machine and the C2 server where separated using VPN networks,
Security - MyFaultSys
Let's look at a trojanized cmatrix binary! Looking at our downloaded cmatrix binary we can see that the binary is not encrypted or compressed but has all function names stripped making understanding the logic a tiny bit more difficult. This first image shows the beginning of the main logic loop. Between variable declarations we find a suspicious cluster of functions at the beginning. It seems highly unusual for cmatrix to be executing anything at the beginning in particular using encrypted strings as arguments. We can safely assume this binary is trojanized given the fact we that we know executing it shows standard cmatrix behavior.
The first function assigned to uVar13 variable already misleads by taking in a string argument. Inspecting its decompiled and disassembled code snippets reveals it does not use that at all. It merely encapsules a convoluted assortment of code which assembles a 32 bit port number and returns it.
We now stumble across an indirect function call. Instead of calling a label directly from memory it gets loaded into a register and the call is done on the register itself. This hides control flow from static analysis like this a little as you can see in the main functions disassembly. Inspecting the called function shows what is depicted in the image below. Some random calculations can be seen which, too, exist only for the sake of confusion. The important part is the final function call which returns the decryption key into the RAX register finally resulting in passing that value through the caller functions return into our variable as expected by the C system V ABI.
Given the decryption key the below shown XOR-cipher decrypts the string passed as the argument and returns a pointer to the decrypted string stored in heap memory without it being freed.
Until now we have constructed a network port number, an en-/decryption key and a decryptes string which turned out to be an IP address of a C2 server! Both the IP and por tare passed into the final function which also uses indirect function calls to obfuscate control flow from decompilers like this. The first function pointer is a fork function meaning cloning our entire process' virtual address space and environment variables. It then checks wether or not it operates within this child process and if so isolates it from the controlling terminal by calling the setsid() function. Within the child process an infinite loop is created calling a function which takes in the IP and port as parameters.
Taking a close look at that function reveals the programs malicious nature almost entirely. The first function assigned to the iVar1 variable checks wether a connection to the command and control server to a specific port is active. If that is not the case the program opens a TCP IPv4 socket and initializes it. Here a watchdog loop begins. Upon translating the IP string into a network address structure it tries connecting the socket followed by cleanup checks if any network related work fails. This is an error. If the connection was successful this watchdog loop forks and isolates one final time then does an indirect function call.
This watchdog loop then continues checking the child process' status and try to reconnect if a termination was detected and also for the existence of a file /tmp/stop which it interprets as a kill-switch used to stop the backdoor process itself as well as this watchdog.
This final function which runs isolated from cmatrix and the watchdog process turns out to be a reverse-shell process. It isolates itself first, reroutes its standard file descriptors to the backdoor socket then replaces the virtual address spaces memory with the by the maliciously crafted install script prepared symlink to a shell. Since environment variables and file descriptors are kept after an execve() call the new isolated shell process will continue hidden in the background with the C2 server until a reboot occurs.

A normal user would not notice anything wrong if this binary was ran. Standard cmatrix functionality is preserved with extra features not appreciated by a user most likely.
meow!
Click The Image Above To Get To The Dedicated CHIP-8 Page!
Login

Terms Of Service

By visiting this web site you agree that I am cool.