There’s a Snake in My Boot Drive

Python is a high-level, object-oriented programming language with an easy-to-learn syntax that can benefit programmers of all skill levels. It is miles away from the complexities of managing computer memory, abstracting away these concepts, which are unnecessary anachronisms to the modern pragmatic programmer, and letting you get on with the important stuff.

The Python programming language is the top choice among cybersecurity professionals due to the vast number of powerful third-party libraries available. The ability to use these libraries to do the heavy lifting greatly reduces the time required to piece together scripts and develop applications. Python is also highly versatile: Security professionals can use it to write software for penetration testing, web development, applications or to simply throw a quick script together.

Sssscript Kiddies

It is well-known that the difference between being a script kiddie and a legitimate, card-carrying hacker is the ability to write your own code and tooling to perform better security assessments. Making the leap from blindly using shrink-wrapped code to creating and working with bespoke tooling can seem a bit daunting to newbie ethical hackers. Luckily, one area of security where Python has found a particularly strong (and slithery) grip is in the penetration testing industry.

Python has been used to create all kinds of well-known tools that would be instantly familiar to any hardened member of the security community. These include everything from simple scripts to full-blown exploit frameworks.

Let’s Get Modular

Due to Python’s widespread uptake, a penetration tester who has gained access to an endpoint will likely find Python installed, meaning that the programming language can be used to create code that manages networking. This is important if you are performing a penetration test because, upon gaining access to a target machine, you will be greeted with the grim reality that the hacking tools you know and love are nowhere to be found. This means that you occasionally need to make your own. Python has a particularly useful module called socket, which gives hackers all the tools they need to set up and execute basic network tasks.

Another very powerful module well worth your time and research is Scapy. This adds protocol analyzer (packet sniffer) capabilities to your Python code and can be used to read traffic, perform Address Resolution Protocol (ARP) cache poisoning, set up man-in-the-middle (MitM) attacks and more.

But Python tooling isn’t just used by white hats; black-hat fraudsters used the language in the 2016 ransomware CryPy, which used the power of Python to innovate on the ransomware genre. It would be very unsurprising to see more and more threats being perpetrated with Python in the near future. Like traditional software development, the cybercrime industry is driven by quick time to value and the ability to stay agile and ahead of competitors. Python is designed with fast, efficient development in mind.

Add Python Programming Language to Your Skillset

Not only is Python the preferred language for penetration testers, it is also a language of choice for service professionals when configuring and integrating security tooling. For example, many application frameworks use Python, as do the application programming interface (API) examples provided on the IBM Security Intelligence GitHub.

Many incident response platforms come with Python modules, which provide a framework for writing action processors and API integrations. IBM product professional services integration engineers frequently build reusable Python modules for common customer integrations such as ServiceNow, Splunk and JIRA.

When you put it all together, you have a fast, efficient language with wide uptake, many cybersecurity applications and all the modules you need to get started fast. It’s easy to see why this is becoming a must-have skill for operating in the security industry, and why the Python programming language is a part of some of the most cutting-edge tooling out there.

More from Application Security

Gozi strikes again, targeting banks, cryptocurrency and more

3 min read - In the world of cybercrime, malware plays a prominent role. One such malware, Gozi, emerged in 2006 as Gozi CRM, also known as CRM or Papras. Initially offered as a crime-as-a-service (CaaS) platform called 76Service, Gozi quickly gained notoriety for its advanced capabilities. Over time, Gozi underwent a significant transformation and became associated with other malware strains, such as Ursnif (Snifula) and Vawtrak/Neverquest. Now, in a recent campaign, Gozi has set its sights on banks, financial services and cryptocurrency platforms,…

Vulnerability management, its impact and threat modeling methodologies

7 min read - Vulnerability management is a security practice designed to avoid events that could potentially harm an organization. It is a regular ongoing process that identifies, assesses, and manages vulnerabilities across all the components of an IT ecosystem. Cybersecurity is one of the major priorities many organizations struggle to stay on top of. There is a huge increase in the number of cyberattacks carried out by cybercriminals to steal valuable information from businesses. Hence to encounter these attacks, organizations are now focusing…

X-Force releases detection & response framework for managed file transfer software

5 min read - How AI can help defenders scale detection guidance for enterprise software tools If we look back at mass exploitation events that shook the security industry like Log4j, Atlassian, and Microsoft Exchange when these solutions were actively being exploited by attackers, the exploits may have been associated with a different CVE, but the detection and response guidance being released by the various security vendors had many similarities (e.g., Log4shell vs. Log4j2 vs. MOVEit vs. Spring4Shell vs. Microsoft Exchange vs. ProxyShell vs.…

Unmasking hypnotized AI: The hidden risks of large language models

11 min read - The emergence of Large Language Models (LLMs) is redefining how cybersecurity teams and cybercriminals operate. As security teams leverage the capabilities of generative AI to bring more simplicity and speed into their operations, it's important we recognize that cybercriminals are seeking the same benefits. LLMs are a new type of attack surface poised to make certain types of attacks easier, more cost-effective, and even more persistent. In a bid to explore security risks posed by these innovations, we attempted to…