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
 

Recommended Reading:

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.
COVID-19: Latest Security News & Commentary
Dark Reading Staff 9/25/2020
Hacking Yourself: Marie Moe and Pacemaker Security
Gary McGraw Ph.D., Co-founder Berryville Institute of Machine Learning,  9/21/2020
Startup Aims to Map and Track All the IT and Security Things
Kelly Jackson Higgins, Executive Editor at Dark Reading,  9/22/2020
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
Special Report: Computing's New Normal
This special report examines how IT security organizations have adapted to the "new normal" of computing and what the long-term effects will be. Read it and get a unique set of perspectives on issues ranging from new threats & vulnerabilities as a result of remote working to how enterprise security strategy will be affected long term.
Flash Poll
How IT Security Organizations are Attacking the Cybersecurity Problem
How IT Security Organizations are Attacking the Cybersecurity Problem
The COVID-19 pandemic turned the world -- and enterprise computing -- on end. Here's a look at how cybersecurity teams are retrenching their defense strategies, rebuilding their teams, and selecting new technologies to stop the oncoming rise of online attacks.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2020-15208
PUBLISHED: 2020-09-25
In tensorflow-lite before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, when determining the common dimension size of two tensors, TFLite uses a `DCHECK` which is no-op outside of debug compilation modes. Since the function always returns the dimension of the first tensor, malicious attackers can ...
CVE-2020-15209
PUBLISHED: 2020-09-25
In tensorflow-lite before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, a crafted TFLite model can force a node to have as input a tensor backed by a `nullptr` buffer. This can be achieved by changing a buffer index in the flatbuffer serialization to convert a read-only tensor to a read-write one....
CVE-2020-15210
PUBLISHED: 2020-09-25
In tensorflow-lite before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, if a TFLite saved model uses the same tensor as both input and output of an operator, then, depending on the operator, we can observe a segmentation fault or just memory corruption. We have patched the issue in d58c96946b and ...
CVE-2020-15211
PUBLISHED: 2020-09-25
In TensorFlow Lite before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, saved models in the flatbuffer format use a double indexing scheme: a model has a set of subgraphs, each subgraph has a set of operators and each operator has a set of input/output tensors. The flatbuffer format uses indices f...
CVE-2020-15212
PUBLISHED: 2020-09-25
In TensorFlow Lite before versions 2.2.1 and 2.3.1, models using segment sum can trigger writes outside of bounds of heap allocated buffers by inserting negative elements in the segment ids tensor. Users having access to `segment_ids_data` can alter `output_index` and then write to outside of `outpu...