- May 31, 2017
- 42
Why would a command line need to be used?You should try it and see. I suspect that a command line is going to have to be thrown at some point, and that is a great place for an AE to block the attack.
Why would a command line need to be used?You should try it and see. I suspect that a command line is going to have to be thrown at some point, and that is a great place for an AE to block the attack.
I have to choose my words carefully so there is no misunderstanding, and so we do not start another argument .Why would a command line need to be used?
I have to choose my words carefully so there is no misunderstanding, and so we do not start another argument .
The safest answer is... "because that is what they do".
I would love to see a kernel level attack similar to the EB/DP attack where the attack is not blocked at all, all inside of lsass.exe, and where a command line is not used at all. This type of attack would be outside the scope of application control utilities, and only an anti-exploit or Windows patch could mitigate an attack like this.
But keep in mind, for true zero days, a Windows patch simply does not exist, and as we all witnessed in the EB/DP attack, there is no guaranty that an anti-exploit can mitigate this attack either.
I am not an exploit expert, but I have not seen such an attack. If someone knows of one, I would be happy to check it out.
But as they say... be careful what you wish for .
Not sure why you believe that a command line is essential. I recommend against using a command line, because it'll be on a vulnerable process list and trigger a process spawn by anti-exe (VPL like I just mentioned).I would love to see a kernel level attack similar to the EB/DP attack where the attack is not blocked at all, all inside of lsass.exe, and where a command line is not used at all. This type of attack would be outside the scope of application control utilities, and only an anti-exploit or Windows patch could mitigate an attack like this.
Hehehe, instead of speculating, will someone please run the above test? I ran the last one, so it is someone else's turn . heheheNot sure why you believe that a command line is essential. I recommend against using a command line, because it'll be on a vulnerable process list and trigger a process spawn by anti-exe (VPL like I just mentioned).
@Andy Ful has already posted details/quotes about the DLL injection via the exploit. Make a custom DLL which does something malicious and apply it with the exploit; don't spawn any additional processes - if you do decide to spawn another process for whatever reason, make sure it uses dynamic forking (also known as "process hollowing" or "RunPE") and if the process architecture is 32-bit running on a 64-bit OS you can use Heavens Gate to confuse AV solutions should they inject even if the target for the dynamic forking is considered "trusted" (dynamic forking will trick security solutions, including anti-executable, into believing that the program running in memory is the one you targeted when in actual fact you start it and then suspend it, then you replace it in memory with the malicious PE).
Make a Win32 C++ application in Visual C++ with the DLL template, disable things like optimization and make it on multi-threaded settings - make sure the run-time is statically linked and not dynamic. Then within the DLL Main function for the DLL_PROCESS_ATTACH you call a function you setup which will execute malicious code.
Here are some ideas you can do within your DLL which are malicious for your file-less attack test:
- Install a device driver -> make the device driver "driverless"/mix it with a Driver Signature Enforcement bypass (e.g. DSEFix if you're on a version of Windows where it isn't patched).
- Inject code into another process like a web browser to steal information.
- Patch files on the system belonging to other software.
- Modify the Windows Hosts file.
- You can even terminate the VoodooShield processes and unload the VSScanner.sys driver if you want.
If you decide to use a kernel-mode driver to be installed, lsass.exe is running under SYSTEM so you can get SeLoadDriverPrivilege via RtlAdjustPrivilege. You might even be able to spawn another program which would already be installed and trusted by anti-executable solutions by stealing the access token from lsass.exe itself/another Windows process like winlogon.exe and then using CreateProcessAsUser using those token -> do it with dynamic forking if you want so anti-executable solutions think that a trusted process like chrome.exe is being spawned when in reality it is your precious rundll32 program LOL.
Do whatever you want in the DLL. Then use the exploit which you are so used to testing to have that DLL injected into lsass.exe and test it all out.
Like I already said in previous posts, I am not experienced with Metasploit otherwise I would test it out myself. Go make a malicious DLL and test the exploit with that if you care so much. You'll find if you do it right it'll work flawlessly without anti-exe intervening, because it doesn't take a genius to figure out that if another process which is not known and trusted is not spawned, then anti-exe won't intervene.
Have fun with that. Gl
Maybe I have tested the circumstances without deploying a file-less exploit attack such as EB (since I am not a Metasploit expert). Alternatively, it could just be a bunch of rubbish I pulled out of thin air. Who knows?Hehehe, instead of speculating, will someone please run the above test? I ran the last one, so it is someone else's turn . hehehe
You're not wrong. For once. Interestingly. Nice catch... I was definitely concealing myself?If I was wrong about Visa being mWave, then I apologize!
Hmm.. I certainly did not expect the chuckle brothers to reunite tonight. If only I was as good at being a "cyber ghost" as you are... pls teach me (*face palm*?)trust me no one here is mWave, thank god
Not sure why you believe that a command line is essential. I recommend against using a command line, because it'll be on a vulnerable process list and trigger a process spawn by anti-exe (VPL like I just mentioned).
@Andy Ful has already posted details/quotes about the DLL injection via the exploit. Make a custom DLL which does something malicious and apply it with the exploit; don't spawn any additional processes - if you do decide to spawn another process for whatever reason, make sure it uses dynamic forking (also known as "process hollowing" or "RunPE") and if the process architecture is 32-bit running on a 64-bit OS you can use Heavens Gate to confuse AV solutions should they inject even if the target for the dynamic forking is considered "trusted" (dynamic forking will trick security solutions, including anti-executable, into believing that the program running in memory is the one you targeted when in actual fact you start it and then suspend it, then you replace it in memory with the malicious PE).
Make a Win32 C++ application in Visual C++ with the DLL template, disable things like optimization and make it on multi-threaded settings - make sure the run-time is statically linked and not dynamic. Then within the DLL Main function for the DLL_PROCESS_ATTACH you call a function you setup which will execute malicious code.
Here are some ideas you can do within your DLL which are malicious for your file-less attack test:
- Install a device driver -> make the device driver "driverless"/mix it with a Driver Signature Enforcement bypass (e.g. DSEFix if you're on a version of Windows where it isn't patched).
- Inject code into another process like a web browser to steal information.
- Patch files on the system belonging to other software.
- Modify the Windows Hosts file.
- You can even terminate the VoodooShield processes and unload the VSScanner.sys driver if you want.
If you decide to use a kernel-mode driver to be installed, lsass.exe is running under SYSTEM so you can get SeLoadDriverPrivilege via RtlAdjustPrivilege. You might even be able to spawn another program which would already be installed and trusted by anti-executable solutions by stealing the access token from lsass.exe itself/another Windows process like winlogon.exe and then using CreateProcessAsUser using those token -> do it with dynamic forking if you want so anti-executable solutions think that a trusted process like chrome.exe is being spawned when in reality it is your precious rundll32 program LOL.
Do whatever you want in the DLL. Then use the exploit which you are so used to testing to have that DLL injected into lsass.exe and test it all out.
Like I already said in previous posts, I am not experienced with Metasploit otherwise I would test it out myself. Go make a malicious DLL and test the exploit with that if you care so much. You'll find if you do it right it'll work flawlessly without anti-exe intervening, because it doesn't take a genius to figure out that if another process which is not known and trusted is not spawned, then anti-exe won't intervene.
Have fun with that. Gl
How funny! Initially you had me fooled because of your *face palm* here...Maybe I have tested the circumstances without deploying a file-less exploit attack such as EB (since I am not a Metasploit expert). Alternatively, it could just be a bunch of rubbish I pulled out of thin air. Who knows?
You're not wrong. For once. Interestingly. Nice catch... I was definitely concealing myself?
Hmm.. I certainly did not expect the chuckle brothers to reunite tonight. If only I was as good at being a "cyber ghost" as you are... pls teach me (*face palm*?)
I'm not trying to impress anyone, I don't have anyone to impress. I merely intervened after watching the on-going debate you were having with @Umbra because I disagreed with some things, and agreed with @Umbra.but not enough to try to impress everyone on here with my "vast knowledge of exploits"...
I was able to load a DLL into LSASS.EXE spawning calc.exe as a POC.
This is already evidence to back up what I have stated previously... Move the malicious code into a DLL which is then injected into lsass.exe via the exploit & then watch the magic happen.So indeed, it is possible to install EternalBlue & DoublePulsar on the target machine without using rundll.exe !
Sorry, I need to clarify... when I said "but not enough to try to impress everyone on here with my "vast knowledge of exploits", I was certainly not referring to anyone specifically... I was just saying that I am not an exploit expert, and I was not trying to impress anyone with my limited knowledge of exploits.I'm not trying to impress anyone, I don't have anyone to impress. I merely intervened after watching the on-going debate you were having with @Umbra because I disagreed with some things, and agreed with @Umbra.
Ever since I intervened over on Wilders Security I have been trying to explain that lsass.exe was compromised which means that the game is already over (technically). I agreed that VoodooShield blocked the DoublePulsar tools in the test, but have tried to explain that if the attack is deployed without the additional process (therefore the post payload becomes executed from within lsass.exe) then it means the product would fail; there would be no additional process to block from running, whereas the post payload would still continue.
@Andy Ful posted the following on this thread recently:
This is already evidence to back up what I have stated previously... Move the malicious code into a DLL which is then injected into lsass.exe via the exploit & then watch the magic happen.
If I try to make an informative post then I am automatically trying to prove that I have a "vast knowledge" on specific topics. If I try to prove a point then I get smacked in the face without re-creating the video to prove what was said even though it is perfectly logical and reasonable and it gets labelled as an invalid "speculation", and if I test a specific feature (e.g self-defense) then I am required to bypass the entire product's process monitoring for it to be valid.
It doesn't even matter to me anymore, I give up with this debate entirely. To avoid future issues, you won't see me mentioning VoodooShield/VS products publicly anywhere further-on.
Have a good weekend everyone.
indeedI think everyone understands what happened in the EB/DP attack and test... people are aware that if the attack is outside the scope of an AE (blocking an executable, script or command line), then it will prove ineffective at blocking the attack. But as I mentioned, for a true zero day, there will not be a Windows patch available, and it is certainly iffy whether an anti-exploit product will block the attack either. Basically, everything would have a difficult time blocking the attack, if it is outside the scope of an AE.
Detecting and Analyzing Malware in the KernelOnce in the kernel, very few security technologies have visibility into kernel-mode malware behavior. Additionally, these components have equal or even higher privileges than most security tools. Thus, attackers can essentially take safe refuge in the kernel, acting on nefarious intentions with little concern for getting caught.
note that EB-DP is targeting enterprise first , home user were caught with it because Win7 enabled SMB by default on all Windows' versions.Umbra, what is the one objective of the EB / DP attack?
What is the attacker trying to accomplish with the combo of the exploit EB and the payload DP?
no you don't understand, the system and entire network is already compromised by EB. DP is just a tool of EB. Blocking the reverse-TCP connection doesn't nullify EB or DP damages.Absolutely!!! The one objective of the EB / DP attack is to load / install DP's malicious tools.
So if DP's tools are blocked, the system obviously is not fully compromised..
But if DP is blocked from performing its one objective, what makes you think for a second that a different payload would not have the same result?no you don't understand, the system and entire network is already compromised by EB. DP is just a tool of EB. Blocking the reverse-TCP connection doesn't nullify EB or DP damages.
the attacker can deploy other methods, when he see his reverse connection was stopped.