InfoStealer Script Based on Curl and NSudo
Last Updated: 2022-08-11 06:54:45 UTC
by Xavier Mertens (Version: 1)
If sudo is a well known tool used daily by most UNIX system administrators, NSudo remains less below the radar. This is a tool running on Microsoft Windows which allows you to execute processes with different access tokens and privileges like:
It can be used with a GUI:
Or command line:
C:\Users\REM\Downloads>nsudo.exe -U:T -P:E cmd.exe
Of course, when executed, the tool will trigger the UAC (“User Account Control”) of Windows depending on your current rights.
The script that I found makes use of this tool but first, it verifies if the user has enough rights otherwise, it will trigger the UAC:
A specific version of NSudo is downloaded from a third-party repository through the classic bitsadmin LOLbin. I still need to check if this binary has been weaponized but it seems no. It's just an old version. Then, NSudo is invoked multiple times to alter the victim’s computer settings:
This is a classic behaviour today, information is exfiltrated via a Discord channel. You can see that curl.exe (today, installed by default on all modern Windows instances) is used to post interesting data to the attacker's channel.
The following data are exfiltrated:
- Full location (Country, City, ...)
- Users, cmdkey, quser
- IP settings
- Browsers details (Chrome, Brava, Opera, Vivaldi)
Less common, the script also exfiltrates data about installed gaming applications:
NSudo is not common and should be added to the list of suspicious tools to track in your eventlogs!
Xavier Mertens (@xme)
Senior ISC Handler - Freelance Cyber Security Consultant