Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Vulnerabilities / Threats

7/7/2016
07:00 PM
Connect Directly
Google+
Twitter
RSS
E-Mail
50%
50%

Hacking A Penetration Tester

How even a pen test conducted by a security pro can be hacked by a determined attacker looking for a way to its target.

Security expert Wesley McGrew and his penetration testing team once found a Meterpreter shell inadvertently left behind by a previous pen tester on their client’s network. “That was one of our first finds in that pen test,” McGrew recalls. “It’s also going to be one of the first things attackers will find.”

Pen tests obviously aren’t typically considered security risks; the purpose of these white-hat hacks is to improve the security of the organization that invites the exercise. But an unsecured live or forgotten Meterpreter shell could be just the entrée an attacker needs to gain a foothold in a network, and new research by McGrew on penetration testing tools and processes has uncovered surprisingly glaring security holes that leave many pen tests at risk of hijacking and breaches by bad guys.

McGrew over the past few years has been examining vulnerabilities and security weaknesses in penetration testing tools, processes, and practices, and will present his latest findings next month in Las Vegas at Black Hat USA. Using a homegrown tool he developed called Snagterpreter that allows an attacker to hijack, monitor, and alter traffic between the pen tester and his or her target/client, he’ll also demonstrate how pen testers can be targeted due to not-so-secure practices employed in their pen-test engagements. McGrew plans to release Snagterpreter (for free) during his Black Hat talk, "Secure Penetration Testing Operations: Demonstrated Weaknesses In Learning Material And Tools."

So how can a bad hacker hack a pen test? McGrew, who is director of cyber operations at Horne Cyber, in his latest research studied popular pen testing training books and materials, and found that few if any include instruction for basic security hygiene such as encryption. Among some of the risky operations described in the pen-testing content he examined were the use of online hash-cracking services; the use of plain-text FTP services; unencrypted Web shells; unauthenticated Netcat “listeners” placed on client machines; plain-text command-and-control between the tester and devices on the target network; and the use of TOR and other proxies.

“Online hash-cracking services are very dangerous because you don’t know who’s running that online service or who intercepts it,” he says. Plain-text FTP sessions and Netcat listeners over unencrypted channels are subject to man-in-the-middle attacks, he says.

“That’s exposing the very data of your client that you’re trying to protect,” McGrew says.

McGrew says some books recommend pen testers use TOR, the anonymizing service. “The problem is you’re then testing through TOR or another public proxy and you have no idea who’s running the proxy or TOR exit nodes. They could be monitoring and intercepting and man-in-the-middling.”

The most likely attackers to hone in on a pen test or pen tester would be a nation-state or organized crime syndicate, for example.

Black Hat USA returns to the fabulous Mandalay Bay in Las Vegas, Nevada July 30 through Aug. 4, 2016. Click for information on the conference schedule and to register.

Exploiting a pen test can be a more effective attack than dropping a Trojan backdoor. “It acts as good cover. So any unusual activity can be blamed on the pen tester” and go undetected as a real attack, he says.

In the worst-case scenario, a penetration tester himself or herself unknowingly gets compromised and used as a stepping-stone into multiple organizations: “The attacker follows them around on all of their engagements …. That’s a serious concern” especially if the pen tester stores a client’s data over a period of time during a pen test, McGrew notes.

There have been no actual pen test hacks reported publicly, he says. “But I have no idea how we would know” an attack came via a pen test or pen tester, he says.

Doing It Right

But there are ways pen testers can operate securely. Metasploit, for example, offers a feature in Meterpreter called “paranoid mode” that configures payloads in a secure way so they can’t be hijacked or manipulated by bad guys virtually looking over a pen tester’s shoulder. It verifies SSL signatures of servers, McGrew notes.

McGrew says he and his fellow pen testers operate via VPNs and avoid overly employing “persistence” or leaving behind tools and an entryway, on a target network.

“Put operational security around what you are doing,” he recommends to pen testers. “Look at how you are conducting the test and see how you would attack it. Identify where the unencrypted protocols are” and protect that traffic, he says.

Few if any of the pen test books and training materials McGrew studied include information on an attacker turning the tables on a pen tester. “None of these books or trainings cover the concept of someone attacking you [the pen tester]. It’s all about getting it to work,” he says. 

Related Content:

 

Kelly Jackson Higgins is the Executive Editor of Dark Reading. She is an award-winning veteran technology and business journalist with more than two decades of experience in reporting and editing for various publications, including Network Computing, Secure Enterprise ... View Full Bio

Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
theb0x
100%
0%
theb0x,
User Rank: Ninja
7/11/2016 | 8:25:13 AM
Root
Most pen testing distros only function correctly running as root. This is another big risk.
Data Leak Week: Billions of Sensitive Files Exposed Online
Kelly Jackson Higgins, Executive Editor at Dark Reading,  12/10/2019
Lessons from the NSA: Know Your Assets
Robert Lemos, Contributing Writer,  12/12/2019
4 Tips to Run Fast in the Face of Digital Transformation
Shane Buckley, President & Chief Operating Officer, Gigamon,  12/9/2019
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
The Year in Security: 2019
This Tech Digest provides a wrap up and overview of the year's top cybersecurity news stories. It was a year of new twists on old threats, with fears of another WannaCry-type worm and of a possible botnet army of Wi-Fi routers. But 2019 also underscored the risk of firmware and trusted security tools harboring dangerous holes that cybercriminals and nation-state hackers could readily abuse. Read more.
Flash Poll
Rethinking Enterprise Data Defense
Rethinking Enterprise Data Defense
Frustrated with recurring intrusions and breaches, cybersecurity professionals are questioning some of the industrys conventional wisdom. Heres a look at what theyre thinking about.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2019-5252
PUBLISHED: 2019-12-14
There is an improper authentication vulnerability in Huawei smartphones (Y9, Honor 8X, Honor 9 Lite, Honor 9i, Y6 Pro). The applock does not perform a sufficient authentication in a rare condition. Successful exploit could allow the attacker to use the application locked by applock in an instant.
CVE-2019-5235
PUBLISHED: 2019-12-14
Some Huawei smart phones have a null pointer dereference vulnerability. An attacker crafts specific packets and sends to the affected product to exploit this vulnerability. Successful exploitation may cause the affected phone to be abnormal.
CVE-2019-5264
PUBLISHED: 2019-12-13
There is an information disclosure vulnerability in certain Huawei smartphones (Mate 10;Mate 10 Pro;Honor V10;Changxiang 7S;P-smart;Changxiang 8 Plus;Y9 2018;Honor 9 Lite;Honor 9i;Mate 9). The software does not properly handle certain information of applications locked by applock in a rare condition...
CVE-2019-5277
PUBLISHED: 2019-12-13
Huawei CloudUSM-EUA V600R006C10;V600R019C00 have an information leak vulnerability. Due to improper configuration, the attacker may cause information leak by successful exploitation.
CVE-2019-5254
PUBLISHED: 2019-12-13
Certain Huawei products (AP2000;IPS Module;NGFW Module;NIP6300;NIP6600;NIP6800;S5700;SVN5600;SVN5800;SVN5800-C;SeMG9811;Secospace AntiDDoS8000;Secospace USG6300;Secospace USG6500;Secospace USG6600;USG6000V;eSpace U1981) have an out-of-bounds read vulnerability. An attacker who logs in to the board m...