Repository navigation
How do we deal with vulnerability reports? #1267
Replies: 3 comments 5 replies
|
Chipping in with a few of the points I mentioned on discord that are worth repeating here: First of all, most if not all the security reports that are coming through are impacting pentester-side, not target-side. These reported issues affect the users own system, which is a low-privilege, isolated VM in most cases. Ultimately, If an attacker already has the level of access needed to trigger these edge cases (crafting malicious LDAP entries, malicious ntlm host/workstation name etc), they have no practical reason to pivot to a pentester's VM and the absolute probability of this happening is so beyond small! Secondly, in my own opinion at least, if a vulnerability in NetExec causes unintended impact on a remote target that the tester cannot control, that absolutely deserves to be addressed. But when the impact is confined to the operator's own VM/system, that falls within the professional/personal responsibility of the person running the tool. You are a security professional, own your own security and deal with issues yourself if they are such a big threat surface/concern. If you have a problem with an open source tool being freely provided to you then either offer to sponsor a user to fix it or fix it yourself on your own accord. Something worth mentioning here is that a lot of these issues are as a result of impacket and less NetExec. Impackets comments in the source code alludes as much that certain features or functionalities are insecure. It's already documented and so it makes it clear who's doing the security research themselves and who's using AI with "hack NetExec, make 0 mistake. do It fast"/ Thirdly, Since its a open source tool, NetExec is provided as-is, freely available, with no warranty or garuntees of any sorts. If someone identifies a concern that matters to their workflow, the appropriate response is to open a PR with a fix or/and idk pay someone to fix it if it's that important!! Lastly, at this rate, there is nothing stopping someone from auditing every line of code in Netexec and the next project until the sun burns out, filing random reports to collect CVEs. That is not a productive use of anyone's time, least of all the maintainers who are building and maintaining this project as a passion project, not a product people pay for or most people even support financially. The maintainers and contributors times are better spent developing their passions and interests with Netexec instead of battling a flood of "vulnerability" reports that have no real world value or impact. If the vulnerability isn't introduced on a remote system, then it isn't a vulnerability worth having time spent on. |
|
First of all I'd like to address a few arguments that I've heard about this topic and add my personal opinion to them:
That is great security practice and I appreciate everyone that operates this way. In fact I think that it is part of a security professional's responsibility to do these things in order to protect every client. However, we shouldn't just assume our own principles and best-practices that we developed over years of experience in the field when assessing security risks in a single software product. Not everyone is as experienced or risk aware as yourself. People might just be starting in IT security. People might be under stress and re-use their work environment for multiple assignments because they "just don't have time" to clean it up. I've even heard of pentesters that aren't allowed to customize their machines the way they would like due to company restrictions (as idiotic as that might be). There's software out there that knows that it has more or less "lost" the security game. This software brings their own sandboxes (e.g., web browsers). If this is the case: Sure, one can build upon the sandbox in the threat model. Otherwise, your custom-built protective measures shouldn't affect the reasoning about whether or not a behavior is a valid security vulnerability.
This is sort of an extension of the previous argument. My opinion on this specific aspect is that the user privileges a tool is run under doesn't affect whether or not something is a valid vulnerability. It only affects the post exploitation possibilities of an attacker. It is best practice for almost every service on a Linux system to run with a dedicated, low-privileged user account (e.g., www-data). Heck, it is nowadays even established to layer stuff like
Even though this might be true in many (but surely not all) places, my opinion on this is that impacket is a low-level library that allows others to speak all of the fancy Windows networking stuff without re-inventing the wheel. The interpretation of the data returned by this low-level stack should be up to the tools consuming it, similarly to a library like In fact, I believe that impacket SHOULD NOT try to filter data received over the network because it changes what is really there. Maybe there is a software that wants to use impacket in order to scan the Internet for weird host behavior, especially highlighting all hosts that for some reason return invalid characters. Imho, this argument does not hold for the example scripts that ship with impacket. These should filter incoming data if necessary just like any other third party program should (see below).
Yes, and in my opinion this means that all of these tools share the same vulnerabilities. The security community is great in quickly building scripts for various scenarios and openly sharing them with each other. For that I love the community and I honestly draw great happiness from being part of this. However, I think that the average code quality (I mean this word without any judgement) is no valid measurement whether or not something is a legitimate risk.
As true as that is, this has nothing to do with the validity of an issue. This argument is true for every single bug report, pull request, time spent in Discord chats, troubleshooting, and of course also vulnerability reports. But it is also true that the people raising these issues don't owe a developer to stay quiet about them. Not owing time does not mean that a certain bug does not exist. But it can help to identify if and how you want to react to such reports.
This is similar to the first argument about using sandboxes/VMs. Not everyone is as experienced as yourself. Most open source tools can be freely downloaded from everyone with every skill level (sometimes there's a compilation step involved that acts as some sort of entry-level knowledge gateway). There is no "NetExec driver's license" that you need to acquire before downloading. Additionally, I have the impression that NetExec has recently started to grow out of its security bubble. I have personally met more than one IT administrator that has already used NetExec or is interested in using it. The well-known and respected German "Heise Verlag" has written at least one major magazine article about NetExec in which they also highlight its usefulness for regular everyday IT administration tasks. But even if we stay with "true" security professionals (whatever that might mean) for this argument: Even with years of experience I can't know what a server sends back to me before I interact with it. How should I possibly know if the interesting machine that I just found and that I would like to analyze more deeply will send me a path traversal in the next command?
For most assessments and use cases of Netexec this will likely be true. However, I see at least two more ore less realistic scenarios:
In a way, yes. I totally see how the most recent developments in AI have made it even harder for open source projects because it is so easy to find stuff. Currently, we are still in a situation where the AI stuff is of varying quality. Some of it is total garbage that hallucinates attack paths because it doesn't understand the code correctly. But in general, AI findings can be valid vulnerabilities. But are these valid vulnerabilities?Whether or not something is a security risk depends on the individual report I'd say. This doesn't only affect path traversal, but since this kind of bug has come up lately I'll stick with it in the following reasoning:
I would say it is fair to ask everyone who discloses a potential vulnerability that they clearly state what effect it might cause and what preconditions must be present. Note however that there are many CVEs out there that contain a phrase like "this requires a non-standard configuration" (I have often read this in Tomcat CVEs for example). Non-standard doesn't necessarily mean "invalid". My opinion is: If the processing of untrusted content can lead to unexpected behavior and if this behavior can be controlled by the content that is provided, there is a high chance that this is a vulnerability. In my opinion (and this might be the most controversial point) a CVE should only be issued if the impact can be proven. Additionally, the category of a CVE and its rating should stick to the codebase of NetExec itself. For example, if I can place a file somewhere on a Linux computer which is then executed by the system, this is not an RCE in NetExec but an arbitrary file write that can lead to RCE. For me, an RCE in NetExec would mean that I can somehow trick the software itself into spawning a shell or executing commands based on the malicious input. How should you react to this?I think that most of the arguments address the fact how developers should react to vulnerability reports. They are valid arguments to make in a public statement in order to justify why you won't ship a fix immediately after something is reported. See above for why I think that they do not impact the fact whether or not something is a vulnerability. I think that it is very true that you don't owe anyone anything. It is also very important to manage your time and mental health when maintaining an open source project. However, fixing bugs (the security and the not-so-obviously-security kind) unfortunately is part of maintainership as well. Even if you would decide to not accept a report as a vulnerability, in most cases it will still be a valid bug because the behavior is undesired. Therefore, I think that it would be reasonable to treat vulnerability reports seriously but without a rush. Imho it is completely valid to push a fix to main without creating a new release, alerting various social media channels and making a big fuzz if something requires a lot of preconditions. However, it would probably help if in that case you define some kind of threat model that you document publicly, e.g., in a |
|
IMO we should definitely still accept vulnerability reports, but we should only consider something a "vulnerability" if it actively affects CIA of the user's machine that wouldn't be possible through normal usage (e.g. write an arbitrary file like the spider_plus issue or run an arbitrary command). Writing a file to a slightly different folder, but not being able to over-write a system file, should just be considered a bug since you can't really do anything with it. If someone wanted to fill a users disk they could just put a ton of files in a share and it would be downloaded anyway, so normal usage of the tool can have the same effect. There's an inherent risk of running a penetration testing tool I think everyone should understand, but running the tool against untrusted machines shouldn't nuke your machine; however, you ARE running something against untrusted machines, so if they do something like report an incorrect hostname, you trust that input yourself and put it into your hosts file and it forces your computer to direct traffic to their machine versus another, that's the users fault, not NetExec's (I'm referencing the hostname "injection" for the hosts file feature we got reported). |
Uh oh!
There was an error while loading. Please reload this page.
A few weeks ago we received our first security advisory (vulnerability report). This vulnerability assumed a threat model where the attacker is running a rogue SMB server in the targeted network and NetExec were to run scans on this rogue server.
The vulnerability itself exploited that the
spider_plusmodule can download files (if enabled) that are reported from the targeted SMB server without any input sanitization, leading to an path traversal that allowed the rogue SMB server to write arbitrary files on the pentesters system in the context of that user.Accepting this vulnerability report kind of opened Pandoras box. Security tooling around Active Directory - including NetExec - were never designed to do any input sanitization and blindly accept and trust information coming from SMB (impacket). Therefore, in the last couple of weeks, we received an increasing number of vulnerability (or sometimes just bug) reports that exploited these kinds of path traversal attacks. Sometimes, this was just a bug that resulted in placing files outside of the
.nxcfolders, but with no real security impact, others leading to full system compromise if NetExec were to run as root privileges (which you should NEVER do btw).Assessing and fixing these kind of bugs/vulns take up a significant chunk of time that is then missing for maintaining the project itself. Therefore, there has been some discussion around how we should and could handle these reports to minimize the effort that has to be invested into them.
To summarize some perspectives from discord discussions, these are some routes that were discussed:
Personally, I am torn between "this costs a lot of time while not having any real value for the tool itself" and "people should be able to trust NetExec, even when running against arbitrary hosts that are potentially malicious".
So, let's discuss. How do we want to deal with security reports in the future?
All reactions