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 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.
97% of Americans Can't Ace a Basic Security Test
Steve Zurier, Contributing Writer,  5/20/2019
How a Manufacturing Firm Recovered from a Devastating Ransomware Attack
Kelly Jackson Higgins, Executive Editor at Dark Reading,  5/20/2019
TeamViewer Admits Breach from 2016
Dark Reading Staff 5/20/2019
Register for Dark Reading Newsletters
White Papers
Video
Cartoon Contest
Write a Caption, Win a Starbucks Card! Click Here
Latest Comment: Could you pass the hash, I really have to use the bathroom!
Current Issue
Building and Managing an IT Security Operations Program
As cyber threats grow, many organizations are building security operations centers (SOCs) to improve their defenses. In this Tech Digest you will learn tips on how to get the most out of a SOC in your organization - and what to do if you can't afford to build one.
Flash Poll
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2019-12253
PUBLISHED: 2019-05-21
my little forum before 2.4.20 allows CSRF to delete posts, as demonstrated by mode=posting&delete_posting.
CVE-2019-12250
PUBLISHED: 2019-05-21
IdentityServer IdentityServer4 through 2.4 has stored XSS via the httpContext to the host/Extensions/RequestLoggerMiddleware.cs LogForErrorContext method, which can be triggered by viewing a log.
CVE-2019-12251
PUBLISHED: 2019-05-21
sadmin/ceditpost.php in UCMS 1.4.7 allows SQL Injection via the index.php?do=sadmin_ceditpost cvalue parameter.
CVE-2019-10319
PUBLISHED: 2019-05-21
A missing permission check in Jenkins PAM Authentication Plugin 1.5 and earlier, except 1.4.1 in PamSecurityRealm.DescriptorImpl#doTest allowed users with Overall/Read permission to obtain limited information about the file /etc/shadow and the user Jenkins is running as.
CVE-2019-10320
PUBLISHED: 2019-05-21
Jenkins Credentials Plugin 2.1.18 and earlier allowed users with permission to create or update credentials to confirm the existence of files on the Jenkins master with an attacker-specified path, and obtain the certificate content of files containing a PKCS#12 certificate.