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.
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
5 Security Technologies to Watch in 2017
Emerging tools and services promise to make a difference this year. Are they on your company's list?
Flash Poll
New Best Practices for Secure App Development
New Best Practices for Secure App Development
The transition from DevOps to SecDevOps is combining with the move toward cloud computing to create new challenges - and new opportunities - for the information security team. Download this report, to learn about the new best practices for secure application development.
Slideshows
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2013-7445
Published: 2015-10-15
The Direct Rendering Manager (DRM) subsystem in the Linux kernel through 4.x mishandles requests for Graphics Execution Manager (GEM) objects, which allows context-dependent attackers to cause a denial of service (memory consumption) via an application that processes graphics data, as demonstrated b...

CVE-2015-4948
Published: 2015-10-15
netstat in IBM AIX 5.3, 6.1, and 7.1 and VIOS 2.2.x, when a fibre channel adapter is used, allows local users to gain privileges via unspecified vectors.

CVE-2015-5660
Published: 2015-10-15
Cross-site request forgery (CSRF) vulnerability in eXtplorer before 2.1.8 allows remote attackers to hijack the authentication of arbitrary users for requests that execute PHP code.

CVE-2015-6003
Published: 2015-10-15
Directory traversal vulnerability in QNAP QTS before 4.1.4 build 0910 and 4.2.x before 4.2.0 RC2 build 0910, when AFP is enabled, allows remote attackers to read or write to arbitrary files by leveraging access to an OS X (1) user or (2) guest account.

CVE-2015-6333
Published: 2015-10-15
Cisco Application Policy Infrastructure Controller (APIC) 1.1j allows local users to gain privileges via vectors involving addition of an SSH key, aka Bug ID CSCuw46076.

Dark Reading Radio
Archived Dark Reading Radio
In past years, security researchers have discovered ways to hack cars, medical devices, automated teller machines, and many other targets. Dark Reading Executive Editor Kelly Jackson Higgins hosts researcher Samy Kamkar and Levi Gundert, vice president of threat intelligence at Recorded Future, to discuss some of 2016's most unusual and creative hacks by white hats, and what these new vulnerabilities might mean for the coming year.