Python is very commonly used for security tools and scripts, but my personal favorite is Ruby. Ruby has a very elegant syntax, has methods that are easy to use, and is easily compiled. It's also the language used in the Metasploit Framework, which is one of the most popular security tools in the world. You can read about the Metasploit team's reasoning for using Ruby here: github.com/rapid7/metasploit-framework/wiki/Why-R…
Python is probably your go-to language. Check out this great Udemy course: udemy.com/penetration-testing-ethical-hacking-cou…
Todd
Software Security TechLead
Definitely Python and Python-like languages. For example, IDA Pro has "IDAPython" too, and there is a Python tool for the gdb debugger called "gdb-peda" which stands for Gnu Debugger Python Exploit Development Assistance.
Other than that, learn about the system architectures like x86 and x64, which is basically the instruction sets given to the processor and what each one does. For example, here is a list of commonly used x86 instructions. But you can get them from the "official source" at Intel. Next, I recommend learning C because C has heavy control over the OS still and many times, you can simply import a library from the OS and manipulate bytes directly that way. You can often do this in Python too with various libraries, but it can be more fun and "more direct" with C itself.