[blog.rayfoo] Infosec, DFIR, tech geekery, thoughts and whatnot

31May/100

Visualizing sshd brute-force attempts

Trying out with some interesting results...

1.---

This one is a Splunk query, run over the span of the last 7 days:

sourcetype="ossec_alerts" rule_number="5710"|
rex field=_raw "Invalid user (?<userid>[^ ]+) from"|
fields + src_ip,userid|fields - _*|
dedup src_ip userid|
outputcsv ssh-atk-attempts-userid-ip

2.---

Then some data massaging on the csv file...

[edit: this is not needed...just output the csv file with the fields in the order you want...and read the next post for better options with 2-column csv inputs]

cat ssh-atk-attempts-userid-ip.csv | \
sed 's/^.*$/&,server/' > ssh-atk-attempts-userid-ip2.csv

3.---

Then running it thru Afterglow and GraphViz's neato...

cat ssh-atk-attempts-userid-ip2.csv | \
./afterglow.pl | neato -Tgif -o ssh-atk-ip-userid.gif

Seems like very little overlap in the userids that were attempted (with the exception of the few favourites like root, guest, test).  A coordinated/distributed attack perhaps?  Haven't dug more into the IPs in question, but I'm pretty sure that they'd be broadband addresses, meaning that they are bots.

Of course we could try with a larger timespan, but the result isn't really readable... The resulting 1MB file (1813 x 1704 px) for over all time in Splunk only looks pretty, and not readable.

[edit: there're better results in the next post!]

30May/100

Afterglow tests

Just tryin'...

Connections from/to laptop

sudo tcpdump -i wlan0 -p|cut -d' ' -f3,5|cut -d':' -f1|tee dump
cat dump |uniq |sed -r 's/^(.*)\.[^.]+ (.*)\.([^.]+)/\1,\3,\2/' > local.csv
cat local.csv |./afterglow.pl |neato -Tgif -o test.gif
Connections to/from laptop

What a mess!

Connections from laptop

Let's try again, this time only focusing on the outgoing connections initiated:

Connections from laptop

Much better...

8Feb/100

(Terminal) Easter Eggs

Friend of mine showed me a link to this video (http://www.youtube.com/watch?v=b-OhjAD937s) showing some easter eggs that can be done within Ubuntu's terminal.

Apparently it can be done on any linux terminal, as long as you have the correct version of apt or aptitude installed, so give it a try and enjoy!

The commands that can be run are:

  • apt-get moo
  • aptitude moo
  • aptitude moo -v
  • aptitude moo -vv
  • aptitude moo -vvv
  • aptitude moo -vvvv
  • aptitude moo -vvvvv
  • aptitude moo -vvvvvv