What’s Stratoshark?
Stratoshark — created by Wireshark founder Gerald Combs and Falco creator Loris Degioanni — brings Wireshark’s deep community visibility to the cloud by means of the Falco ecosystem. It combines Wireshark’s packet evaluation with Falco’s runtime safety for sooner troubleshooting, assured incident response, and cloud-native flexibility. Customers can analyze system calls, cloud logs, and community packets with the trusted precision Wireshark has supplied for over 25 years.
In impact, if you know the way to do investigations on packets with Wireshark, you now know tips on how to do the identical for system calls and cloud logs!
Why ought to I care?
Stratoshark is a unique approach of doing forensics and investigations within the cloud-native world, impressed by Wireshark. Wireshark offers a deep workflow to carry out some of these duties, and lots of safety practitioners have skilled on it and use it of their day by day life. Stratoshark means that you can use that skillset in opposition to trendy knowledge sources and threats. Why let all these assets and coaching go to waste?
Stratoshark will at all times be free and open to make use of. We wish the group to have entry to the most effective instruments to cope with what’s taking place within the trendy world.
Okay, you’ve obtained me — how do I do it?
Simply head on over to https://stratoshark.org and click on on the corresponding obtain hyperlink on your working system. Identical to Wireshark, Stratoshark runs in your native machine.

In my case, I’m going to seize the macOS Arm disk picture. Whereas that’s downloading, you’ll word there are another assets on the Stratoshark house web page that you simply would possibly discover helpful, from movies to extra superior use circumstances.
On a Mac, simply open the dmg then drag and drop Stratoshark to the Functions folder.

(On Home windows you’ll get an executable installer — simply comply with the steps!)
Once more, on a Mac, you’ll have to click on “open” in your first time operating Stratoshark to acknowledge you downloaded an software from the web.

In case you’re aware of Wireshark, it is best to now have a window up that you simply really feel proper at house in!

From right here you’ll be able to go a couple of other ways. We are able to set up ChmodBPF to seize a seize from the native machine (possibly not probably the most sensible use case, however enjoyable to play with nonetheless), we will use the Falco plugin for cloudtrial to research S3 knowledge, or we will provoke a distant seize utilizing sshdig.
For at present we’ll go for the final possibility, however watch the Sysdig weblog for future posts the place we’ll go over performing an investigation on modifications in an AWS setting through the cloudtrial plugin.
So as to use sshdig, we’ll want another factor on the distant endpoint with a purpose to seize the system calls. Identical to Wireshark wants entry to tcpdump to assemble packets, sshdig will want one thing on the endpoint to seize the system calls. On this case, it makes use of opensource sysdig to do it.
Fortunately, putting in that can be fairly easy, as we’re capturing from a Linux field. So as to set up sysdig, simply run the next command on the goal host:
curl -s https://s3.amazonaws.com/obtain.draios.com/secure/install-sysdig | sudo bash
Code language: Perl (perl)
Go forward and login to your Linux goal:

And set up sysdig:

To confirm sysdig is put in and operating, open the curses interface by operating
sudo csysdig

Congratulations! You’ve put in sysdig! To exit, simply hit Q.
In case you’d wish to study extra about what you are able to do with it, try this weblog on tips on how to use Sysdig OSS.
Now, let’s return to our Stratoshark interface, double click on on “SSH distant syscall seize: sshdig”, and fill out a few prompts.
Give it a distant tackle and port.

You’ll additionally want to supply a consumer with sudo entry and a password. You’ll need this consumer set to not require a password to sudo. To allow this, you’ll want so as to add `USERNAME ALL=(ALL) NOPASSWD: ALL` to your sudoers file. In my case that’s at etcsudoers
and I’ve appended this: stratoshark ALL=(ALL) NOPASSWD: ALL to the underside of my file.

Ensure sysdig is chosen and set sudo as the way in which to do privileged entry. Ensure eBPF is checked.

Set a file for logging if you’d like.

From right here, simply click on on Begin!
Vital word: On a Mac, the primary time you run Stratoshark, you’ll most likely get this immediate blocking it from operating. You’ll have to click on Permit and restart Stratoshark. Whenever you shut and open Statoshark, you’ll have to put your password again in for the seize settings. To do this, simply click on on the little gear subsequent to “SSH distant syscall seize: sshdig” and re-enter it.

A connection shall be established, and now you’ll begin seeing seize knowledge!

Bonus spherical: examine one thing!
What would a cryptominer appear like in Stratoshark? Let’s discover out! On this case, we’ll trigger one to indicate up on goal for illustration’s sake, however stealing cloud time to run cryptominers is just not an unusual occasion in trendy assaults (SCARLETEEL is one such assault the place a cryptominer is used).
To do that, we’ll deploy an ubuntu container, then pull down xmrig and run it, all whereas capturing system calls from the host with Stratoshark.
The first step: Deploy the container!
Word: In case you haven’t put in docker in your Linux host, try the instructions right here.
Deploy the most recent ubuntu container and fix to it:
docker run -i --name ubuntu -t ubuntu:newest /bin/bash

Let’s give it a fast replace for enjoyable simply to indicate it’s working: run apt replace.

Nice! Lets set up curl: apt set up curl, then hit y to proceed.

Now that we’ve curl in our container, we will go get xmrig.
curl -OL https://github.com/xmrig/xmrig/releases/obtain/v6.16.4/xmrig-6.16.4-linux-static-x64.tar.gz

Extract xmrig
tar -xvf xmrig-6.16.4-linux-static-x64.tar.gz
Code language: CSS (css)

Change to the xmrig listing:
cd xmrig-6.16.4
Code language: CSS (css)

Now we’re able to catch some cryptomining!
Return to your Stratoshark interface. In case you haven’t already, shut the check seize that we did earlier.

Now let’s begin a brand new seize. Click on the little gear and confirm you may have your password and different gadgets set, then click on on begin.

With the seize operating, change again over to your terminal and run the next command from the xmrig listing we turned into earlier:
timeout 30s ./xmrig -o stratum+tcp://xmr.pool.minergate.com:45700 -u [email protected] -p x -t 2
Code language: Perl (perl)

Wait till you get a connection error, connection refused (we’re not truly going to do some mining right here, we’re simply having a little bit enjoyable!).
Go forward and control-c out of your cryptominer, then swap to the Stratoshark window and hit cease.

Now we’ve an enormous seize file to work with the place we all know one thing malicious occurred. Let’s use our first filter in Stratoshark and search for something coming from the xmrig course of. To do that, go to your filter bar on the prime and sort: proc.title == “xmrig”

In case you’re aware of Wireshark, issues will begin wanting fairly acquainted now. You’ll see issues like occasion names, coloration coding, and extra On the very prime it is best to see the execve occasion. That is once we executed xmrig.
In case you spotlight that first occasion, the actual energy of Stratoshark begins to turn into obvious. The quantity of forensics knowledge on a single course of is staggering. Identical to with a packet in Wireshark, you begin to get important quantities of knowledge on the occasion itself.

On the prime you get some generic system occasion data on timing, size, and so forth. The subsequent part down is the place issues begin to get actually fascinating. Underneath Sysdig Occasion, you’ll discover that you’ve element, particularly within the parameter part. You’ll see the executable title, adopted by the entire arguments handed to it, the PID, and different helpful setting data, such because the container id below env HOSTNAME (on this case, a22456d7ae21).
If we maintain happening, we will get particulars on occasions and processes, similar to course of ancestors. In our case, we ran with a 30-second timeout from bash inside a container. We are able to see systemd spawned the contianerd runtime, which is the place we ran bash, and in the end the timeout command.
Additional down we will use consumer data and shell knowledge (in our case root and bash).
All of this knowledge we’re is from a single execve occasion from simply beginning the xmrig course of in our container! As you’ll be able to think about, should you do suspect one thing malicious is happening inside a bunch, and it’s essential discover out extra data and accumulate proof, Stratoshark excels at this.
Be happy to mess around with the seize and see what else you’ll be able to glean from it. Preserve a watch out for the subsequent publication within the Stratoshark collection, the place we’ll undergo utilizing Stratoshark to drag cloudtrial knowledge to analyze modifications in cloud configuration.
In case you’d wish to study extra, discuss extra, and even contribute to Stratoshark, please be a part of the Discord and begin working with the group at present!