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 Executive Editor at DarkReading.com. 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.
Crowdsourced vs. Traditional Pen Testing
Alex Haynes, Chief Information Security Officer, CDL,  3/19/2019
BEC Scammer Pleads Guilty
Dark Reading Staff 3/20/2019
Register for Dark Reading Newsletters
White Papers
Video
Cartoon Contest
Write a Caption, Win a Starbucks Card! Click Here
Latest Comment: This comment is waiting for review by our moderators.
Current Issue
5 Emerging Cyber Threats to Watch for in 2019
Online attackers are constantly developing new, innovative ways to break into the enterprise. This Dark Reading Tech Digest gives an in-depth look at five emerging attack trends and exploits your security team should look out for, along with helpful recommendations on how you can prevent your organization from falling victim.
Flash Poll
The State of Cyber Security Incident Response
The State of Cyber Security Incident Response
Organizations are responding to new threats with new processes for detecting and mitigating them. Here's a look at how the discipline of incident response is evolving.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2018-18913
PUBLISHED: 2019-03-21
Opera before 57.0.3098.106 is vulnerable to a DLL Search Order hijacking attack where an attacker can send a ZIP archive composed of an HTML page along with a malicious DLL to the target. Once the document is opened, it may allow the attacker to take full control of the system from any location with...
CVE-2018-20031
PUBLISHED: 2019-03-21
A Denial of Service vulnerability related to preemptive item deletion in lmgrd and vendor daemon components of FlexNet Publisher version 11.16.1.0 and earlier allows a remote attacker to send a combination of messages to lmgrd or the vendor daemon, causing the heartbeat between lmgrd and the vendor ...
CVE-2018-20032
PUBLISHED: 2019-03-21
A Denial of Service vulnerability related to message decoding in lmgrd and vendor daemon components of FlexNet Publisher version 11.16.1.0 and earlier allows a remote attacker to send a combination of messages to lmgrd or the vendor daemon, causing the heartbeat between lmgrd and the vendor daemon t...
CVE-2018-20034
PUBLISHED: 2019-03-21
A Denial of Service vulnerability related to adding an item to a list in lmgrd and vendor daemon components of FlexNet Publisher version 11.16.1.0 and earlier allows a remote attacker to send a combination of messages to lmgrd or the vendor daemon, causing the heartbeat between lmgrd and the vendor ...
CVE-2019-3855
PUBLISHED: 2019-03-21
An integer overflow flaw which could lead to an out of bounds write was discovered in libssh2 before 1.8.1 in the way packets are read from the server. A remote attacker who compromises a SSH server may be able to execute code on the client system when a user connects to the server.