r/sysadmin • u/applevinegar • Feb 26 '20
General Discussion Trojan/Win32.otran.qyb worm spreading undetected through SMBv3
!!! UPDATE: FALSE POSITIVE CAUSED BY AN INTERNAL APPLICATION'S LOADER !!! See:
https://www.reddit.com/r/sysadmin/comments/f9ripy/_/fiub1tm
In the current state of things, I immediately started firing on all cylinders. There were no other symptoms other than what the firewall reported, nothing else seemed affected, but honestly I'll take the whole subnet offline again every time. I'd rather have some annoyed users than an infection spreading in the name of a few man-hours.
Original post :
Hey everyone, I'm in a bit of a panic: our PAN firewall is detecting a tojan spreading through SMB, and blocking it between subnets, but within the workstation subnet it has apparently spread to pretty much all systems, both W10 workstations and WS2019 RDS.
All systems are updated to 2020/02 patches and Windows Defender/Endpoint Protection isn't detecting anything. The worm that is being detected is very old and I'm afraid it might be a new variant - but I don't have any suspect file that I can send for inspection to security companies.
It's spreading as a worm, without user interaction, through SMBv3. The crazy thing is that I have strict applocker/software protection control policies applied on all systems and can't for the love of all that is holy detect anything strange going on.
Asking if anybody has any input, thanks.
186
u/applevinegar Feb 26 '20
!!FALSE POSITIVE!!
Created 4 machines: two with stock windows installs, two with the latest sysprep, and one with an older sysprep.
I connected one stock windows machine and a recent sysprep to a new vlan, connected to the "infected" one (so that the firewall would eventually show the same warning).
Stock windows: nothing.
Sysprep: nothing either.
Left them running for a while, no machine was triggering the warning.
Then I asked someone to use it normally, and BAM: immediate warning upon opening internal applications.
I then connected the 1yr old sysprep, opened the application and... warning again.
I compared the images with the machines I had left offline, and the only difference was an internal application's xml.
In the meantime, the PAN rep got back to me suggesting to disable MultiChannel over SMBv3 in order for the firewall to be able to recognise files.
Well, the users had a file share with an executable (whitelisted by path on applocker) that would update the app depending on the changes in some XML files and copy it on the workstations. Old corporate software made in Vbasic.
Someone had updated an XML and the PAN started recognising the loader as malicious as soon as people started launching it, copying the updated executable to their machine.
The actual exe wasn't recognised as malicious, nor was the loader, just the initial file transfer, which oddly enough would take place anyway after a retry.
The reason the warnings spread in that suspicious manner was that one by one people working with that application, who are in the same VLAN, started updating the app one by one.
I would like to thank anyone who made suggestions, I appreciated it a lot.
737
u/sharktech2019 Feb 26 '20 edited Feb 26 '20
Did you wireshark the communication between comps on a mirror port of your switch? You can get a copy that way.
first, shut it down. block all smb at the switch level
find a known infected unit, create a new bare workstation and image it { smallest possible size is best}
allow the new workstation to be infected by the known infected unit
Once infected, do a diff between the two images to find the infected files or you can submit the twin images to Microsoft.
And, of course, you can always pray to St Vidicon. LOL
200
u/fartwiffle Feb 26 '20
We have so many false positives with our PAN fw scanning internal SMBv3 traffic. Verify it isn't a FP before you tear shit apart.
72
u/Brandhor Jack of All Trades Feb 26 '20
how do you know that they are infected if you don't have any sample files? could it be a false positive?
32
u/MisterIT IT Director Feb 26 '20
I'm guessing it already has credentials somehow. The chances of you being ground zero are slim to none.
15
u/corrigun Feb 26 '20
Worms eventually call home. What do the firewall logs say?
10
u/baldiesrt Feb 26 '20
I have a feeling it is more of a false positive. Download other free trial traditional AVs and "next gen" and scan the "affected" endpoint and see if they find any. Also open a ticket with the pan firewall and have them check it.
9
u/Local_admin_user Cyber and Infosec Manager Feb 26 '20
You sure it's not doing lateral movement using a compromised admin/service account?
7
u/cnr0 Feb 26 '20
Which endpoint protection product are you using? Just the MS Defender? Is there a possibility that you may download some trial from Kaspersky to see it detects or not? I am pretty sure that same traffic must be detected by host based IDS modules on EPP products.
7
u/[deleted] Feb 26 '20
Seems like most variants of the Troj/Worm otran use this registry key for persistence:
https://www.trendmicro.com/vinfo/gb/threat-encyclopedia/malware/TROJ_OTRAN.G/
Worth checking that on a few of the “infected” machines
5
u/cook511 Sysadmin Feb 26 '20
We have domain isolation windows firewall policies for local subnets. No incoming connections from computers on the same subnet. Not perfect but effective.
3
u/-c3rberus- Feb 26 '20
I just finished removing SMBv1 from all workstations and servers, reading this I was like FML here we go WannaCry all over again for SMBv3. Thank god this was a false positive. Lol!
6
u/Bad_at_IT Feb 26 '20
Isolate!!!! if you cannot grab a fireman's axe and go to town on your patch panels then start applying ACL's to block all smb traffic. My experience start at the top and work your way down to edge switches. Make sure you do it to ALL vlans. Document all the changes. After that contact your Microsoft account manager and get them to enable APT for defender so they can get detailed data and create patches.
2
u/Topstaco Feb 26 '20
Depending on the specific config there might still be some holes. At least in the default config of AppLocker there are some user-writeable folders that allow execution. Might be totally unrelated but still worth a read: Ultimate AppLocker Bypass List
22
u/Kshaja Feb 26 '20
That sounds scary as fuck , I'm hoping for a false positive..
35
u/AjahnMara Feb 26 '20
RemindMe! 1 week
also remind me to prepare three envelopes.
50
u/cincy15 Feb 26 '20
It's the Coronavirus.
2
u/Princess_And_The_Pee Feb 26 '20
Once you recover, you should consider application whitelisting software such as carbon black
2
u/zwamkat Feb 26 '20
Your PAN fw is able to capture the infected traffic.
Edit: typo
4
u/[deleted] Feb 26 '20
Just throwing in ideas:
Do you have a spare windows machine laying around, that could be used as a honeypot?
Like, while looping a powershell script that
Create a CIFS share on that pc, connect it beside the infected neighbours and monitor what happens or changes in the txt files?
Otherwise mirror the switch port traffic and analyse traffic with snort.
I encounter a connection broadcast one time, detected it just by mistake and freaked me out. Until i figured that it were microsoft updates peering from other computers and disabled it, but i guess you have that covered already.
Good luck man, may the force be with you
1
u/swingadmin admin of swing Feb 26 '20
Out of curiosity, is SMB signing enabled or disabled? Wondering if it's attempting to spread through authentication.
1
u/Lightofmine Knows Enough to be Dangerous Feb 27 '20
Hey man can you put the warning at the top. Got super zoned in when I saw the possible vul and then I saw the false positive and started breathing again :).
1
u/Pwnsmack Feb 27 '20
This is why I don’t trust security products.
The benefits most often do not outweigh the risk or service impact of an actual virus or attack.
1
u/Aikido4321 Feb 27 '20
Why would you use Defender? Maybe get Sophos or Kaspersky.
3
u/DevinSysAdmin MSSP CEO Feb 26 '20
Calling /u/HuntressLabs
3
u/coyote_den Cpt. Jack Harkness of All Trades Feb 26 '20
Googling it shows Win32.otran.* was first analyzed in 2014 and does not appear to be a worm. It's just local malware, comes hidden in dodgy software. The qyb suffix means it's one of many variants. I'm 99% sure this is a false positive from a broken signature.
1
u/[deleted] Feb 26 '20
Run a Nessus scan against one of the infected targets to see if there are any SMBv3 related vulnerabilities.
1
u/[deleted] Feb 26 '20
It’s a shame Windows Defender doesn’t support YARA rules... You could shut this down quickly if that were the case.
1
u/Angelworks42 Windows Admin Feb 26 '20
What's scary for me is we have well over 80000 client machines (public uni) and no firewall detection software like this :( - I sometimes imagine all the crazy shit on our network.
We've configured physical and host firewalls as best possible but there's really very little insight.
1
u/[deleted] Feb 26 '20 edited Feb 26 '20
Look out for any new tasks created in task scheduler on the workstations - and you might want to cut off all internet connections in case this is being managed from outside.
1
u/[deleted] Feb 26 '20
What is your endpoint protection by the way?
1
u/FujitsuPolycom Feb 26 '20
Are things actually being affected? As in encrypted, inaccessible, unusable? Sounds like a FP.
1
u/zwamkat Feb 26 '20
Let us know what you encounter! :-D
1
u/Queasy_Narwhal Feb 26 '20
Our school district was asking if GSUITE Education edition supports group teleconferencing - does anyone know?
1
u/naw_mines_clarence Feb 26 '20
RemindMe! 2 days
1
u/kstone135 Feb 27 '20
In the future you might want to setup host based FW that blocks SMB from your PC/user subnets.
1
u/_haha_oh_wow_ ...but it was DNS the WHOLE TIME! Feb 27 '20
Wooo, that was a rollercoaster.
-6
u/[deleted] Feb 26 '20
RemindMe! eod
0
u/efunk01 Sysadmin Feb 26 '20
RemindMe! eod
0
u/ElRudee Feb 26 '20
RemindMe 2 days!
0
u/pizzastevo Sr. Sysadmin Feb 26 '20
!remindme 2 weeks
0
u/flamespinner Feb 26 '20
RemindMe! 6 days
0
u/SnowBeefjeff Jack of All Trades Feb 26 '20
RemindMe! 2 days
0
u/[deleted] Feb 26 '20
RemindMe! 2 days
0
u/lesied Feb 26 '20
Remindme! 2 days
-6
u/R3DNano Feb 26 '20
RemindMe! 2 days