r/Python • • Mar 07 '17

CIA uses Python (a lot)

From the latest Vault 7 leaks from Wikileaks, we can see that CIA uses a lot of Python in its secret hacking tools.

Most notably in the Assassin, Caterpillar, MagicViking and Hornet projects.

Unfortunatelly, no files from these projects have been released yet. But if you look at the dump that was released, there are plenty of .py files, and even PIL is included.

There are even Coding Conventions: https://wikileaks.org/ciav7p1/cms/page_26607631.html

You can see more Python-related stuff here: https://search.wikileaks.org/?query=python&exact_phrase=&any_of=&exclude_words=&document_date_start=&document_date_end=&released_date_start=&released_date_end=&publication_type%5B%5D=51&new_search=False&order_by=most_relevant#results

1.1k Upvotes

220 comments sorted by

View all comments

126

u/dr_g89 Mar 07 '17

If you read through some of the files there are some cool libraries they are referencing. Has anyone used angr before?

57

u/tunisia3507 Mar 07 '17

I've read the readme three times and still don't know what it's for.

8

u/sillycyco Mar 08 '17

I've read the readme three times and still don't know what it's for.

angr is similar to debugging tools you may have used, but entirely within python. Full decomposition of logic, and allowing for analysis of code at a much lower level. Aka scan for exploitable functionality in existing binary code, among other things. Pretty slick actually.

1

u/Dababolical Mar 09 '17 edited Mar 09 '17

I know very little about this, but coincidentally read about IDA today. https://www.hex-rays.com/index.shtml

Is this the python equivalent of the suite (I'm sure there are some differences).

Would someone wanting to implement DRM on their application possibly use this library to make sure their DRM is secure after the application is compiled? I am just trying to think of applications for this library, because it is really interesting.

1

u/sillycyco Mar 09 '17

Ya it is similar to hex-rays, have a look at this talk at Defcon for its various uses: https://www.youtube.com/watch?v=oznsT-ptAbk

You could use it to do analysis of your binaries, attempt to see if you can analyze and get around whatever it is you are trying to protect.