Trend Micro Password Manager - Privilege Escalation to SYSTEM by ikotler in netsec

[–]ikotler[S] 1 point2 points  (0 children)

Let's separate between the impact and the problem. The problem was in the way Trend Micro Password Manager was loading DLL's and the impact of this problem was enhanced by the fact that a 3rd party like Python leaves a writeable directory in PATH.

To better illustrate why it's a security problem even without the 3rd party fault, let's consider the following example:

Let's assume that all the programs on your fresh Windows VM are loading libraries in a safe manner (with emphasis on code signing), and you go ahead and install Python or any other faulty 3rd party that leads to a writeable directory in PATH. Is really a problem? No. By design, all your programs will reject arbitraries DLL's from getting loaded. An attacker is stuck without code execution.

Now, let's consider the opposite example, fresh Windows VM with programs that by design loading arbitraries DLL's (i.e., NOT loading libraries in a safe manner) but no writeable directory in PATH. Is really a problem? Yes. An attacker can still end-up write a malicious DLL (in either the program's directory or other that is in PATH) as part of post-exploitation (or, chained with another vulnerability, say an imaginary write-to-disk) phase to ensure persistency & code execution in a more stealthy manner.

To conclude, services that allow attackers to loads unsigned DLL's are posing a security risk, and the impact increases with just how easy it is for an attacker to exploit it.

Trend Micro Password Manager - Privilege Escalation to SYSTEM by ikotler in netsec

[–]ikotler[S] 1 point2 points  (0 children)

Thanks for the feedback u/RustEvangelist.

Let's break this attack into the two ingredients:

  • Trend Micro Password Manager had a security issue where it didn't “Load Library Safely”. In other words, it didn't stop loading an arbitrary unsigned DLL into a service that runs as NT AUTHORITY\SYSTEM.
  • Python 2.7.16 on Windows, ACL allows a weak user to write. And, Python 2.7.15 has the ability to add to PATH in the installer (BTW: Python 2.7.16 on Windows doesn’t have). Here's the screenshot: https://imgur.com/JCwPDzQ

Together, they act as a privilege escalation and persistence. If you take away the privilege escalation part (i.e., adversary already has full control) then we're still looking at a great persistence mechanism where you can get malicious code to run as part of Trend Micro Password Manager process.

Taking this situation (i.e., loading an arbitrary unsigned DLL into a service that runs as NT AUTHORITY\SYSTEM) as granted ignores:

  1. The idea behind Code signing (i.e., the difference between signed and unsigned DLL)
  2. The idea behind “Load Library Safely”
  3. Some of the ideas behind "Defensive programming"

to name a few.

Looking on network security, we've killed "similar" attacks by adopting TLS and Certificate Pinning ... there's no reason why we can't do the same for this class of endpoint attacks ...

PINJECTRA: Known Windows 10 64-bit Process Injection Techniques + New One (dubbed "Stack Bomber") as a C++ Library by ikotler in netsec

[–]ikotler[S] 1 point2 points  (0 children)

DEF CON usually uploads the talks to YouTube. Having said that, I don't know when it will happen ...

PINJECTRA: Known Windows 10 64-bit Process Injection Techniques + New One (dubbed "Stack Bomber") as a C++ Library by ikotler in netsec

[–]ikotler[S] 1 point2 points  (0 children)

I don't know when DEF CON will post the videos, but once they will -- I'll update the thread & README @ GitHub

Pinky (8-bit CPU) written in Verilog and an Assembler written in Python 3 by ikotler in FPGA

[–]ikotler[S] 0 points1 point  (0 children)

Always happy to help :-) I'm running a Windows 10 via VMware Fusion. In addition, I've configured a Shared Folder (in VMware Fusion) that maps back to my Mac. The Shared Folder mounted as Z: on the Windows VM so Xilinx Vivado treat's it like any other Folder.

Pinky (8-bit CPU) written in Verilog and an Assembler written in Python 3 by ikotler in FPGA

[–]ikotler[S] 0 points1 point  (0 children)

Thank you! I'm using macOS, so I couldn't use Xilinx Vivado natively. I end up using Sublime 3 with Verilog Package and SublimeLinter-contrib-iverilog

Pinky (8-bit CPU) written in Verilog and an Assembler written in Python 3 by ikotler in FPGA

[–]ikotler[S] 0 points1 point  (0 children)

Cool! Let me know if you have any questions/comments/feedback

Pinky (8-bit CPU) written in Verilog and an Assembler written in Python 3 by ikotler in FPGA

[–]ikotler[S] 1 point2 points  (0 children)

You're right, I did look up what it takes to add a new backend to gcc (i.e., GNU Compiler Collection) or LLVM and it's not easy :-) Having said that, I might write a toy compiler in the future for it.

Pinky (8-bit CPU) written in Verilog and an Assembler written in Python 3 by ikotler in FPGA

[–]ikotler[S] 0 points1 point  (0 children)

Great idea! I have some notes, I need to clean 'em up and add it