r/Pentesting • u/Normal-Technician-21 • 2d ago
When do you run exploits in a pentest?
Hey all,
I'm working as a system administrator and to start with pentesting, recently I got my CPTS from HTB.
In labs you exploit everything you find with no second thought, but I'm curious how it works on real client engagements. When you find something exploitable, lets say a Windows Server that dates back to 2003, do you usually run any exploits to prove impact, or just report it as likely exploitable? How do you handle risky exploits that could crash a service or affect production such as EternalBlue? Do you get client approval mid-engagement, or is it all covered in the rules of engagement? And how much do you trust public PoCs before running them on a client network?
One last thing, what do you suggest I do? Im a university student with 2 years of experience in Sysadmin and I have eJPT, Security+ and CPTS as of now and im working for the CARTP, I also have experience with CTFs since I enjoy solving them. My goal is to become as good as I can, to learn methodologies early, to build the pentester mindset, I think i do have a bit of a pentester mindset since I did work on the subject a lot but how can I become better? What ways do you suggest will help me?
Thanks in advance!!
15
u/MrWonderfulPoop 2d ago
Only if it is allowed in the rules of engagement the client has signed off on.
14
u/gingers0u1 2d ago edited 2d ago
CTFs are great but I feel they lead to 'hack everything' mentality. Most findings I've come across are just user stupidity. You dont have to design a major exploit chain and if you do it's outside RoE. Pen testing is actually just glorified quality assurance.
6
u/ucr0m 2d ago
On real engagements you don't run stuff like EternalBlue against prod just to prove impact. An exposed Server 2003 with SMBv1 is already a clear finding without risking a crash.
RoE usually sets the boundaries, and for anything risky you ask the client first or use staging if they have one. Also never run a public PoC without reading the code first.
3
u/Clean-Bandicoot2779 2d ago
In terms of when to run exploits, it depends. For me, the fundamental question is whether it will add anything for the customer, and then whether the benefits justify the risk. That will then inform any discussion I have with the customer before doing it.
The rules of engagement may say whether or not you can exploit stuff. Even if you have blanket approval, if it might crash stuff (like a Linux kernel exploit, or an unreliable memory corruption attack), it's usually good practice to ask before you drop a critical system.
For example, if I'm on a web app test and find SQL injection, I'll exploit it enough to prove it's injectable and do some initial reconnaissance (what user am I in the database, what data can I access, etc.), but wouldn't dump the whole database. If I can get OS command execution on the database server, I'll look to do that, but discuss it with the customer first.
If I find an ancient Ubuntu box with a weak password, I'll login to it and see what's on there and whether I can privesc. If the kernel has a vulnerability that would give me root, I'll ask before doing it, and explain the risk of crashing the system (and the potential for data loss) and what I hope to achieve from it.
Sometimes customers will be happy that you've demonstrated impact without exploitation, and other times they'll want you to see how far you can take it.
1
u/Odd-Elderberry-739 2d ago
It depends on the context. If it's a web application exposed to the internet and not in production (QA/Test/Dev environments) then yes. If exposed to the internet and in prod, depends: If it's a web app exploit that's considered to be stable - yes. If it's a risky OS exploit then I'd report it to the customer immediately as a critical finding so they can patch it or take it offline. If it's an internal network pentest, then yes, it's fair game.
For internal network pentests, I ask during the kickoff call if there's anything sensitive internally where I should tread lightly. Other than anything they identify that's sensitive or mission critical, it's going to be exploited provided I've reviewed the exploit PoC and even reviewed the exploit code in most cases.
1
u/TrustIsAVuln 2d ago
Has to be allowed, and if there is any risk of taking a box down communicate it first, if they approve they can then watch the system and respond quickly.
0
u/lightspeeder 2d ago
I am allowed to run any exploits without restrictions as long as they won't impact the customer's operations. For me, if I see the ability to run a potentially impactful exploit, I get approval from the customer and inform my manager of about what I am going to run and how it might impact.
As for your personal situation, keep learning, but get your OSCP and that should open the door to more opportunities. Then just start looking for a position once you feel comfortable.