Ведущие: Денис Макрушин и Юрий Наместников
Среди прочих мер, направленных на защиту корпоративной инфраструктуры от злоумышленников, специалисты по безопасности полагаются на строгую политику ограничения доступа приложений к интернету. Защита информационных систем предприятия основана главным образом на принципе «запретить все, что не разрешено». Тем временем угрозы безопасности притаились в недрах корпоративных сетей и ждут, когда у сотрудников закончится рабочий день. Мы расскажем вам, как с наступлением темноты киберпреступники используют Notepad, AutoCAD, Tomcat и SQL Server в своих целях.
19. APT STORY: FROM CHINA WITH LOVE DLL…
19
Very popular technique among chinese APT groups: PlugX, Emissary
Panda, Wonknu and etc
• 7 zip archive
• Legit signed EXE
• With malicious DLL
• Legit file name
• Legit name of a function. But this function contains malicious code
20. …DLL HIJACKING
20
Example:
• Dll can do two things: xor and load code in the memory
• In the same directory there is a *.url file with xored backdoor code
Right now on the other side of the world, where it is night system administrators go to sleep and mafia wakes up in the infrastructure of organizations. So good Day Ladies and Gentlemen, we are Yury Namestnikov and Denis Makrushin here to let you open your eyes for a moment during this game and see who plays for mafia.
It seems firewalls and whitelists must protect the corporate systems from all kinds of mafia. We allow only trusted and known applications to enter the internet. The phenomenon of malicious software in corporate networks should be killed by using only trusted applications, isn’t?
… И вот почему: технологии мирных жителей – белые списки, прочно закрепились в индустрии в различном виде (fw, App control, etc). Принцип их действия просто до безобразия, однако технологическая реализация остается нетривиальной: контролировать попадание нежелательных элементов из «темной» стороны не всегда оказывается возможным…
But When night falls, the mafia wakes up. In childhood, Who spilled a flour in the house to catch a thief? We did, but in our childhood It didn’t work, but It works now.
The 3 main criteria to devide ghost false positive. If you are whitelisted app, If you are trusted app with certificates, and if you like to execute a malicious code. Come here! As a result a lot trusted apps came from shadow: in their memory we found a lot of unexpected code.
So we actually analyzed only the applications that were never suspected to do malicious things. Using the statistics of connections to known malicious servers and attempts to download known malware.
We found 30 000 connection attempts of the sort from computers and servers located in 94 countries during 2015. Actually there were a lot of servers that runs trusted applications like database engines, application servers, web servers and etc.
We was waiting for trivial Exploiting or DLL hijacking attempts, but we impressed that the first things, that we spotted: various applications contains Internet Explorer engine as a result SAPlogon or ERP module try to connect on website with exploit kits
For example, 1c is a erp system popular in Russia with ie engine in one of modules. And you know how it was: Internet explorer + angler exploit kit
Unexpected functionality is one thing, but then we found what we’ve expected: injection in ERP system to get credit card data processed by connected point of sale terminal. Data goes to mafia in real time.
Now let’s look at servers behavior. Let’s start from web servers and java application servers. Here is the example: 4th od December 20015 6 am. Tomcat version 8 downloading and executing malicious script using standard windows tools. What kind of files?
MOF- files are a containers of wmi modules, execute encoded vbs scrips using csscript.exe. They don’t use any suspicious exe files. By the way in some rare cases we found out that the mof are downloaded and executed by Microsoft SQL Server. But it was not one anomaly wit ms sql.
Or look on the behavior. It is not a normal, because my sql server downloads a lot of files. Malicious files. Should we still think it plays for good guys?
Most of the files are DDoS botnets components – we found several different spices – all made in China. They can do different kind of ddos attacks: but certainly they are very effective, cause servers have broadband connection. MySQL is not better than MS. Once again, we see DDoS bots and even signed ones.
Moreover there are some intersections in names of modules and C2 servers in MS SQL and My SQL infections: we suspect it’s one mafia group.
And there actually is even bigger problem with both these software.
First, we have spotted that the bad guys are interested in data stored on these servers. Than it became clear that they can manipulate this data by installing remote control tools on the servers.
Ok, we now know which payload they use on the servers. But how do they get in?
First of all it’s classic of genre when you try to exploit remote code execution vulnerability on the server-software
Secondly – dll hijacking technique. It’s used since 2010 but still actual even at this time, because it can bypass Whitelisting-based protection.
Third – unlicensed software with trojans or software downloaded not from trusted sources.
История про ботнет, который исползует UDF MySQL для DDoS Впервые Chikdos был обнаружен специалистами польского CERT (Computer Emergency Response Team) в 2013 году. Тогда троян ориентировался на компьютеры под управлением Windows и Linux. Зараженные машины становились частью ботнета, использовавшегося для проведения DDoS-атак. Кампания двухлетней давности затрагивала и сервервы, но тогда вредонос устанавливали на них едва ли не вручную, после брутфорса, направленного на SSH, и подбора логина-пароля.
Новая версия малвари атакует уже не пользовательские машины, а MySQL серверы. Эксперты Symantec полагают, что они были выбраны в качестве мишени неслучайно: скорее всего, злоумышленников привлекает тот факт, что MySQL серверов много (это вторая по популярности СУБД в мире) и их полоса пропускания позволяет весьма эффективно использовать их для атак.
Атака начинается с внедрения вредоносной UDF (user-defined function), которая выступает загрузчиком (Downloader.Chikdos), то есть загружает на сервер фактическую малварь, в классификации Symantec получившую название Trojan.Chikdos.A. Эксперты пишут, что пока не совсем ясно, каким образом злоумышленники подсаживают на сервер вредоносные UDF. Чаще всего, такое осуществляют при помощи с SQL-инъекций, автоматического сканирования и использования червей.
Будучи выполнена, UDF скачивает на зараженный сервер основного вредоноса (малварь хранится на скомпрометированных сайтах). И, в некоторых случаях, загрузчик также создает и прописывает в систему нового пользователя.
Where the victims are located? TOP countries are: India, Russian Federeation, China. Companies in these counties are known for usage software from untrusted recourses and not updating installed software.
Victims are from different economic sectors: it, computer games…
We analyzed a lot of different payloads: ddos bots, downloaders, backdoors and remote control tools. Most traces lead to China: language checks in the code, forgotten debug strings and most of C2 are located on chineese dynamic dns servers.
Найти все приложения, уделить им пристальное внимание в трафике.
As a result we still have a rhetorical question: does silver bullet exist? Teoretically yeah, it does – Default Deny, whitelisting, exploit prevention technologies. But practically, we still have a human factor: you need to use this technologies correctly.