Didier Stevens

Saturday 17 July 2021

Update: base64dump.py Version 0.0.16

Filed under: My Software,Update — Didier Stevens @ 0:00

This new version of base64dump.py brings bug fixes and support for BASE85 RFC 1924 encoding.

If you want to know how I go about adding a new decoding to base64dump.py, watch this video:

Here is version, with bug fixes but without base85:

base64dump_V0_0_15.zip (https)
MD5: 95C78B0DC830C6240F2A56A3BA0C483F
SHA256: F011136B2CF4F54647AB4B699CE7F3575925B2BD09EED409E4BBE34FEB8C570A

And here is version with base85:

base64dump_V0_0_16.zip (https)
MD5: 91E283BDF292C463E349DC535EF50535
SHA256: E85345971D209559ED6602F16C6DBBF526816848B2F15B44C06A7DE7B28F2F8C

Thursday 15 July 2021

New Tool: dnsresolver.py

Filed under: My Software,Networking — Didier Stevens @ 0:00

I’ve done several experiments with DNS, which has lead me over the last couple of years to develop a DNS resolver tool.

By no way is it a full fledged DNS server: it implements particular features that I’ve needed for different experiments I conducted.

It can serve files, facilitate exfiltration, do tracking, answer wildcard requests, do rcode testing and also simple resolving.

Upcoming blog posts will go into more details for some of these features.

Example of payload command: serving a file over DNS TXT records
dnsresolver_V0_0_1.zip (https)
MD5: 340C7324EB66EB4F567B38F374DD2564
SHA256: 56AD87585FDCC20C219BF4A27D9640ECD563E4155816990AB4E7B85AAFA5F047

Tuesday 13 July 2021

Update: FileScanner Version

Filed under: My Software,Update — Didier Stevens @ 0:00

This new version of FileScanner brings bug fixes and new features, like UNICODE filename support and an embedded man page.

FileScanner_V0_0_0_7.zip (https)
MD5: D3294BE258F5E2CD9ADF60035D5FB444
SHA256: 8D9349A2056CF400DF55D0407287144A038B6268E40919F248866B4C8BC3FD0A

Monday 5 July 2021

New Tool: texteditor.py

Filed under: My Software — Didier Stevens @ 0:00

I have some ad hoc tools, that help me with special text editing tasks. Like doing search and replace in a text file, with a list of search and replace terms. Or looking for assignment statements in the source code of a program, and replacing each variable with its value.

I decided to bundle these ad hoc scripts, into a single generic script, a new tool: texteditor.py

Here is an example, take text file example.txt with the following content:

There is an apple on the sun.
It is nice and warm.

And CSV file sar.csv with the following content:


The following sarcsv command edits file example.txt with sar.csv:

./texteditor.py input=example.txt edit=sarcsv,file=sar.csv output=-

The output of this command is:

There is an pear on the moon.
It is nice and warm.

texteditor_V0_0_1.zip (https)
MD5: C8BA3AA8E8549B0159B76CF4A520976B
SHA256: D605DF7560C0CDBDCA3F4C1B1DC11EE9765813149B60D144714CF1C6E92CEC22

Sunday 4 July 2021

Update: xmldump.py Version 0.0.7

Filed under: My Software,Update — Didier Stevens @ 0:00

This update to xmldump.py, a tool to help with viewing XML files, adds option -j (–jsoninput) to handle JSON output produced by zipdump.py.

With this option, shared strings from OOXML spreadsheets will be used with command celltext.

I will explain more in an upcoming blog post.

xmldump_V0_0_7.zip (https)
MD5: 20FBBC1A053B2528AC4200B917637876
SHA256: 0D7850CEEDEB7EFD9E8645CF8DD59F1912E9EB3C135346F98AF3E3A7BAAE2B68

Monday 21 June 2021

Update: oledump.py Version 0.0.61

Filed under: My Software,Update — Didier Stevens @ 0:00

This new version of oledump.py comes with Excel 4 formula parsing improvements in the plugin_biff plugin.

oledump_V0_0_61.zip (https)
MD5: 6DC34FFAF4ED0066696ED230878AEED9
SHA256: 41A68ABA19BBA74DAE653BE62D4A63A5AE409FB6DC1DAEEB2D419AA1B493728A

Tuesday 15 June 2021

Update: 1768.py Version 0.0.7

Filed under: My Software,Update — Didier Stevens @ 0:00

There are no code changes to this version of 1768.py, my tool to analyze Cobalt Strike beacons.

What is new, is file 1768.json: this file contains statistical data for license IDs.

Over a period of one month, I collected license ID information from these sources: threatviewio and @cobaltstrikebot.

For each license ID that is found on more than one IP address / hostname, I include simple statistics: the number of unique IP addresses / hostnames and the number of unique public keys.

When analyzing malicious Cobalt Strike beacons, I often see recurring license IDs. That’s why I decided to add logic and a JSON file to my tool, with license IDs I’ve seen before. And now this has evolved to a small repository of often seen license IDs.

Here is an example with a sample we discussed on the Internet Storm Center diary:

The license ID is 1873433027 and this ID is associated with 18 unique IP addresses / hostnames, and 15 unique public keys. This is a clear indication that this license ID is used by malicious actors. License IDs that have been seen only once, could belong to red teams, that is why they are not included in file 1768.json. The more often a license ID is seen, the higher the chance it is used by malicious actors. Of course, it is not excluded that there are legitimate license IDs from red teams in this list, but I expect they will have low frequencies.

Takeaway: if your sample has a license ID that appears in 1768.json, then it has been seen before (at least twice), and you’re likely not dealing with a pentest.

1768_v0_0_7.zip (https)
MD5: D93AC5707FD0B5315A1225121071C7F2
SHA256: B417790451681643B2269AC516A99F3CEE9F7F374AB529FD53D5702A70F79409

Friday 11 June 2021

New Tool: ssdeep.py

Filed under: My Software — Didier Stevens @ 10:35

ssdeep.py is a Python tool to calculate ssdeep hashes using the ppdeep Python module.

As I needed a Python implementation of an ssdeep tool, I decided to document the creation of such a tool with a video. I use my Python templates to quickly create this tool.

ssdeep_V0_0_1.zip (https)
MD5: 32FD610D858E91BC009845E105ED87C3
SHA256: 02EA18EF0139B54D8A06AA0D3E7E2B0E2934E3675C453759E3DA3CC4F936F0A2

Update: Python Templates Version 0.0.5

Filed under: My Software,Update — Didier Stevens @ 10:14

Here is an update to my Python templates.

I use these templates as a starting point for new tools or for quick development of ad-hoc tools.

I also recorded a video showing how to use my template to create your own tool: ssdeep Python Example Based On My Templates.

python-templates_V0_0_5.zip (https)
MD5: 137878F4D7F799436F76C0119E6BB621
SHA256: 5A68B115B5616BC35CFB4DDEA64C029BF10DDCD6BFF5E4B9D3D4DBBC0FBD6651

Sunday 30 May 2021

New Tool: cs-dns-stager.py

Filed under: My Software — Didier Stevens @ 17:59

cs-dns-stager.py is a quick & dirty tool I wrote to retrieve a Cobalt Strike DNS beacon from its server, if you only have the IP address of said server.

If you want to know more about Cobalt Strike and DNS, watch this video I recorded:

Next Page »

Blog at WordPress.com.