A perspective to incident response or another set of recommendations for malware authors



Similar documents
Automating Linux Malware Analysis Using Limon Sandbox Monnappa K A monnappa22@gmail.com

Websense Content Gateway HTTPS Configuration


UNMASKCONTENT: THE CASE STUDY

Flow Analysis Versus Packet Analysis. What Should You Choose?

Operation Liberpy : Keyloggers and information theft in Latin America

Startup guide for Zimonitor

HoneyBOT User Guide A Windows based honeypot solution

Agenda. Taxonomy of Botnet Threats. Background. Summary. Background. Taxonomy. Trend Micro Inc. Presented by Tushar Ranka

Security Threat Kill Chain What log data would you need to identify an APT and perform forensic analysis?

Proxies. Chapter 4. Network & Security Gildas Avoine

F-SECURE MESSAGING SECURITY GATEWAY

This report is a detailed analysis of the dropper and the payload of the HIMAN malware.

JOOMLA REFLECTION DDOS-FOR-HIRE

How To Mitigate A Ddos Attack

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

INDUSTRIAL CONTROL SYSTEMS CYBER SECURITY DEMONSTRATION

Network Security and Penetration Testing

Contents. Identity Assurance (Scott Rea Dartmouth College) IdM Workshop, Brisbane Australia, August 19, 2008

Contents. vii. Preface. P ART I THE HONEYNET 1 Chapter 1 The Beginning 3. Chapter 2 Honeypots 17. xix

Practical Threat Intelligence. with Bromium LAVA

Getting Ahead of Malware

Controlling Risk, Conserving Bandwidth, and Monitoring Productivity with Websense Web Security and Websense Content Gateway

Automated Vulnerability Scan Results

Integrated SSL Scanning

An Introduction to Incident Detection and Response Memory Forensic Analysis

Architecture. The DMZ is a portion of a network that separates a purely internal network from an external network.

Intrusion Detection in AlienVault

Lab exercise: Working with Wireshark and Snort for Intrusion Detection

HTTPS Inspection with Cisco CWS

Breach Found. Did It Hurt?

Networks and Security Lab. Network Forensics

6WRUP:DWFK. Policies for Dedicated IIS Web Servers Group. V2.1 policy module to restrict ALL network access

Configuring Personal Firewalls and Understanding IDS. Securing Networks Chapter 3 Part 2 of 4 CA M S Mehta, FCA

Description: Objective: Attending students will learn:

User Guide Supplement. S/MIME Support Package for BlackBerry Smartphones BlackBerry Pearl 8100 Series

Centre for the Protection of National Infrastructure Effective Log Management

05 June 2015 A MW TLP: GREEN

Comprehensive Malware Detection with SecurityCenter Continuous View and Nessus. February 3, 2015 (Revision 4)

(maybe?)apt1: technical backstage

Alert (TA14-212A) Backoff Point-of-Sale Malware

Darknet and Black Hole Monitoring a Journey into Typographic Errors

Introduction of Intrusion Detection Systems

Evading Infrastructure Security Mohamed Bedewi Penetration Testing Consultant

Security of IPv6 and DNSSEC for penetration testers

Monitoring System Status

2. From a control perspective, the PRIMARY objective of classifying information assets is to:

How To Monitor A Network On A Network With Bro (Networking) On A Pc Or Mac Or Ipad (Netware) On Your Computer Or Ipa (Network) On An Ipa Or Ipac (Netrope) On

Firewall Testing Methodology W H I T E P A P E R

Cyber Essentials. Test Specification

Network Security Policy

CS 356 Lecture 17 and 18 Intrusion Detection. Spring 2013

The Benefits of SSL Content Inspection ABSTRACT

Integrated SSL Scanning

UNCLASSIFIED. General Enquiries. Incidents Incidents

Firewall Firewall August, 2003

NIST ITL July 2012 CA Compromise

Security workshop Protection against botnets. Belnet Aris Adamantiadis Brussels 18 th April 2013

SSL VPN Server Guide Access Manager 3.1 SP5 January 2013

Network Security Monitoring

Shellshock. Oz Elisyan & Maxim Zavodchik

2010 Carnegie Mellon University. Malware and Malicious Traffic

Configuring SSL Termination

JK0 015 CompTIA E2C Security+ (2008 Edition) Exam

Radware Security Research. Reverse Engineering a Sophisticated DDoS Attack Bot. Author: Zeev Ravid

Richard Bejtlich / taosecurity.blogspot.com BSDCan 14 May 04

ProxyCap Help. Table of contents. Configuring ProxyCap Proxy Labs

Authentication Application

What do a banking Trojan, Chrome and a government mail server have in common? Analysis of a piece of Brazilian malware

Public Key Infrastructure (PKI)

Penetration Testing with Kali Linux

Port evolution: a software to find the shady IP profiles in Netflow. Or how to reduce Netflow records efficiently.

Plugging Network Security Holes using NetFlow. Loopholes in todays network security solutions and how NetFlow can help

Chapter 9 Firewalls and Intrusion Prevention Systems

Protecting the Infrastructure: Symantec Web Gateway

INFORMATION SECURITY TRAINING CATALOG (2015)

Penetration Test Report

Botnet Analysis Leveraging Domain Ratio Analysis Uncovering malicious activity through statistical analysis of web log traffic

[ X OR DDoS T h r e a t A d v i sory] akamai.com

IDS Categories. Sensor Types Host-based (HIDS) sensors collect data from hosts for

Worms, Trojan Horses and Root Kits

S/MIME on Good for Enterprise MS Online Certificate Status Protocol. Installation and Configuration Notes. Updated: October 08, 2014

Hide and seek - how targeted attacks hide behind clean applications Szappanos Gábor

Hands-on Network Traffic Analysis Cyber Defense Boot Camp

Network Security Testing using MMT: A case study in IDOLE project

Passive SSL. Passive Detection and Reconnaissance Techniques, to Find, Track, and Attribute Vulnerable Devices

CMPT 471 Networking II

Session Hijacking Exploiting TCP, UDP and HTTP Sessions

Security vulnerabilities in the Internet and possible solutions

ENEE 757 CMSC 818V. Prof. Tudor Dumitraș Assistant Professor, ECE University of Maryland, College Park

Introduction to Computer Security Benoit Donnet Academic Year

Firewalls and Software Updates

Firewall Server 7.2. Release Notes. What's New in Firewall Server 7.2

Protecting Your Organisation from Targeted Cyber Intrusion

Symantec Database Security and Audit 3100 Series Appliance. Getting Started Guide

APT Advanced Persistent Threat Time to rethink?

Multi-Homing Dual WAN Firewall Router

Intrusion Detection System

Transcription:

A perspective to incident response or another set of recommendations for malware authors Alexandre Dulaunoy - TLP:WHITE alexandre.dulaunoy@circl.lu June 7, 2013

CIRCL, national CERT of Luxembourg CIRCL 1 is composed of 6 full-time incident handlers + 2 FTE backup operators. The team is operating as an autonomous technical team relying on its own infrastructure. Operators competencies include reverse engineering, malware analysis, network and system forensic, software engineering and data mining. CIRCL, the national CERT, is part of SMILE 2 gie (a publicly funded organization to promote information security in Luxembourg). In 2012, CIRCL handled more than 10000 security events and conducted more than 400 technical investigations. 1 http://www.circl.lu/ 2 http://www.smile.public.lu/ 2 of 21

Disclaimer Even if the presentation includes recommendations for malware authors, the main objective is to share techniques used by the attackers and especially how to detect these techniques within a targeted infrastructure. Like any secure coding recommendations, I don t expect these to be read a lot... by the malware authors. 3 of 21

The origin of the malware author recommendations... As a (potential) malware author, you might wonder why a CERT is giving recommendations. It could be a way to force malware authors to go in specific directions... An incident response team is usually encountering a lot of malware. Humans tend to compare what they see and analyse. Malware is often just a piece of software. Sometime is a clever piece of software and sometime it s just crap 3. Some are using clever tricks or some not. The recommendations are just a collection of what we saw as analysts and where improvements 4 could be. 3 Don t worry security software can also fall into this category. 4 or a trend for a security researcher 4 of 21

Learning from old school criminals Keep it simple... 5 of 21

Code signing Should I be scared, as a malware author, about code signing? What are my competitors doing? How do they sign their malware? 6 of 21

Stealing private keys Various compromised systems have accessible certificate store. A standard PFXExportCertStoreEx with EXPORT PRIVATE KEYS flag 5 can do the job to gather private keys. If you cannot steal private keys, you can still purchase stolen private keys from some colleagues running SpyEye/Zeus/Citadel campaigns. 5 http://www.circl.lu/pub/tr-13/ 7 of 21

Asking the CA to sign Another option is to ask a CA (or sub-ca) to sign your code. You have around 600 CAs/sub-CAs around the world. You might find the one that is economicaly or politically close to you. As some CAs are just checking the domain name, a stolen subdomain could do the job. Revocation of your certificate might be an issue but it s not uncommon to see weeks or months before the revocation is effective in CRL or in OCSP 6. 6 Assuming X.509 revocation process is properly working at your target 8 of 21

Are CA Trustworthy on a revocation side? What are the revocation reasons of X.509 certificate? After one year of fetching X.509 CRL, you can have a good overview: Hits Revocation Reason 678039 Cessation Of Operation (code 5) 172888 Unspecified (code 0) 89823 Certificate Hold (code 6) 88788 Superseded (code 4) 76445 Key Compromise (code 1) 43482 Affiliation Changed (code 3) 3910 Privilege Withdrawn (code 9) 230 CA Compromise (code 2) 1 A A Compromise (code 10) 9 of 21

Compromising the CA In the set of 600 CAs/sub-CAs, you can find one (or more) CA vulnerable. Especially some sub-cas have weaknesses in their web interfaces. Some attackers compromised various CAs 7 at different levels. A lot of work? As an attacker, you are looking for an easier and faster path. 7 Not only DigiNotar if you look at the reason of revocation in the CRLs, CA compromise is not uncommon. 10 of 21

Using legitimate signed binaries - PlugX case 11 of 21

Using legitimate signed binaries - PlugX case The easiest path is to take existing signed binaries and find vulnerabilities where you can load your binaries from the running signed binaries. In the case of PlugX 8, they used various legitimate DLL (from McAfee to Symantec products) to abuse the LoadLibrary function. As the signature verification is only done when loading, the signed binary can be then used in memory to load the malicious payload. Revocation is unlikely to happen as the DLL is used in legitimate software. If the vendor needs (wants) to fix its software, it will take some time. 8 http://www.circl.lu/pub/tr-12/ 12 of 21

Network communication The don t(s) when you write your communication protocols for your malware. 13 of 21

Binary protocols, PoisonIvy... PoisonIvy (RAT) protocol is relying on a binary protocol. Many default parameters like TCP Port 3460, fixed protocol size and default password. For an incident response team, it s simple to scan, detect or even brute-force for PoisonIvy PoisonIvy victim sends 256 bytes Controller Controller response with 256 9 bytes PoisonIvy victim Controller send 4 bytes (size to be send) but hardcoded 0xd0150000 PoisonIvy victim 9 0x35e1066ccd15873eeef8518966b70f8b first 16 bytes - with default admin password 14 of 21

Binary protocols, Linux sshd library rootkit... A recent Linux malware rootkits (aka cpanel/libkeyutils.so.1.9) the ssh library to gather username/password. The author(s) used UDP packet on port 53 to send exfiltred username/password. It seems very clever (to hide your traffic in DNS traffic) but... NIDS are trying to decode the DNS payload without success. ( error on decoding) 15 of 21

HTTP protocol, why not? but? A good start to be embedded in the traffic but you should avoid protocol done like Fakem RAT: Where the RAT client is sending an HTML page to the server via HTTP and with a constant title. alert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (content:"<html><title>1"; depth:14; content:"6< 2F title><body>";) Avoid to use meaningful name like: http://<ip>:1001/c.php?botnet=<victimname> 16 of 21

MiniDuke, some good practises MiniDuke 10 is a set of targeted attacks composed of a set of malware. Initial bootstrap of the malware used social networks to fetch next stage of the malware. Proxy C&C used known compromised system. The compromised systems were multihomed virtual hosts (6000 hosts). From a network analysis perspective, victims are checking IP addresses generating a lot of false-positives. 10 http://www.circl.lu/pub/tr-14/ 17 of 21

HTTP good pratices for malware authors Using a random list of User-Agent headers for a malware is not very clever. (e.g. some companies analyse the distribution of UA agents per workstation) Instrumenting the web browser is usually more efficient and limit detection. Don t forget that latency and time schedule are critical when instrumenting web monkeys. As an example, Snifula is using standard DeleteUrlCacheEntry() 11 to delete the URLs from the browser history. 11 http://www.circl.lu/pub/tr-13/ 18 of 21

Domain and hostname management for your C&C Don t re(use) the same domains for various targets. Don t share the same IP addresses on various hostnames. (Passive DNS are great and especially for incident response team) Don t use the same email addresses for a set of domains to be used by your C&C. Don t forget that DNS is full of record types. (A record is just one type, you might want to use TSIG, SOA, SPF,...) 19 of 21

Conclusion The list of recommendations is not exhaustive. (e.g. memory usage versus disk usage, custom crypto, logging, debug, VM detection,...) Malware authors should not underestimate OPSEC 12. Don t forget that the mess is on both side and can be from the benefit of the other side. Sometime the attacker can be the victim, don t forget about it when you write your software. 12 urlhttp://www.slideshare.net/grugq/opsec-for-hackers 20 of 21

Q&A? 21 of 21