Instant download (Ebook) The Rootkit Arsenal: Escape and Evasion in the Dark Corners of the System by Bill Blunden ISBN 9781598220612, 1598220616 pdf all chapter
Instant download (Ebook) The Rootkit Arsenal: Escape and Evasion in the Dark Corners of the System by Bill Blunden ISBN 9781598220612, 1598220616 pdf all chapter
(Ebook) The Rootkit Arsenal: Escape and Evasion in the Dark Corners of
the System by Bill Blunden ISBN 9781449626365, 144962636X
https://ebooknice.com/product/the-rootkit-arsenal-escape-and-evasion-
in-the-dark-corners-of-the-system-4680258
(Ebook) Offshoring IT: The Good, the Bad, and the Ugly by Bill Blunden
(auth.) ISBN 9781430207405, 9781590593967, 143020740X, 1590593960
https://ebooknice.com/product/offshoring-it-the-good-the-bad-and-the-
ugly-4491208
(Ebook) Riches Among the Ruins: Adventures in the Dark Corners of the
Global Economy by Robert P. Smith, Peter Zheutlin ISBN 9780814410608,
081441060X
https://ebooknice.com/product/riches-among-the-ruins-adventures-in-
the-dark-corners-of-the-global-economy-4448310
(Ebook) Managing the Insider Threat: No Dark Corners and the Rising
Tide Menace by Nick Catrantzos ISBN 9781032274201, 1032274204
https://ebooknice.com/product/managing-the-insider-threat-no-dark-
corners-and-the-rising-tide-menace-46522242
(Ebook) The Visual Effects Arsenal: VFX Solutions for the Independent
Filmmaker by Bill Byrne ISBN 9780240811352, 0240811356
https://ebooknice.com/product/the-visual-effects-arsenal-vfx-
solutions-for-the-independent-filmmaker-1265696
https://ebooknice.com/product/managing-the-insider-threat-no-dark-
corners-4741746
https://ebooknice.com/product/memory-management-algorithms-and-
implementation-in-c-c-2147976
https://ebooknice.com/product/virtual-machine-design-and-
implementation-c-c-34170680
https://ebooknice.com/product/managing-the-insider-threat-no-dark-
corners-21963830
The Rootkit Arsenal Escape and Evasion in the Dark
Corners of the System 1st Edition Bill Blunden Digital
Instant Download
Author(s): Bill Blunden
ISBN(s): 9781598220612, 1598220616
Edition: 1
File Details: PDF, 81.33 MB
Year: 2009
Language: english
The Rootkit Arsenal
Escape and Evasion in the
Dark Corners of the System
ISBN-13: 978-1-59822-061-2
ISBN-I0: 1-59822-061-6
10 9 8 7 6 5 4 3 2 1
0905
Microsoft, PowerPoint, and Windows Media are either registered trademarks or trademarks of Microsoft Corporation in the
United States and/or other countries. Computrace is a registered trademark of Absolute Software, Corp .. EnCase is a
registered trademark of Guidance Software, Inc. Eudora is a registered trademark of Quakomm Incorporated. File
Scavenger is a registered trademark of QueTek Consulting Corporation. Ghost and PowerQuest are trademarks of
Symantec Corporation. GoToMyPC is a registered trademark ofCitrix Online, LLC. KeyCarbon is a registered trademark of
www.keycarbon.com. Metasploit is a registered trademark of Metasploit, LLC. OpenBoot is a trademark of Sun
Microsystems, Inc. PC Tattletale is a trademark of Parental Control Products, LLC. ProDiscover is a registered trademark of
Technology Pathways, LLC. Spector Pro is a registered trademark of SpectorSoft Corporation. Tripwire is a registered
trademark of Tripwire, Inc. VERlSIGN is a registered trademark of VeriSign, Inc. VMware is a registered trademark of
VMware, Inc. Wires hark is a registered trademark of Wireshark Foundation. Zango is a registered trademark of Zango, Inc.
Other brand names and product names mentioned in this book are trademarks or service marks of their respective
companies. Any omission or misuse (of any kind) of service marks or trademarks should not be regarded as intent to infringe
on the property of others. The publisher recognizes and respects all marks used by companies, manufacturers, and
developers as a means to distinguish their products.
This book is sold as is, without warranty of any kind, either express or implied, respecting the contents of this book and
any disks or programs that may accompany it, indudi ng but not limited to implied warranties for the book's quality,
performance, merchantability, or fitness for any particular purpose. Neither Jones and Bartlett Publishers nor its dealers or
distributors shall be liable to the purchaser or any other person or entity with respect to any liability, loss, or damage caused
or alleged to have been caused directly or indirectly by this book.
All inquiries for volume purchases of this book should be addressed to Wordware Publishing, Inc.,
at the above address. Telephone inquiries may be made by calling:
(972) 423-0090
Thi ' d dicated to Sun Wukong,
s book IS e , chl'ef-maker,
the quintessen tial mlS
Contents
Part 1- Foundations
Chapter 1 Setting the Stage . . . . . . . . . . . . . . . . . . . · . . . . . 3
1.1 Forensic Evidence .3
1.2 First Principles. . . . . . . . . . . . . . . . . . . . . . · . . . . . . 8
Semantics . . . . . . . . . . . . . . . . . . . . . . .. . · . .. . . . 9
Rootkits: The Kim Philby of System Software . . . . .. 11
Who Is Using Rootkit Technology? · 13
The Feds .. · 13
The Spooks . . . . .. . · 13
The Suits . . . . . . . . · 15
1.3 The Malware Connection. · 15
Infectious Agents . . . · 16
Adware and Spyware . . . · 17
Rise of the Botnets . . . . · 17
Malware versus Rootkits . · 19
Job Security: The Nature of the Software Industry . · 19
1.4 Closing Thoughts. . . . . . . . . . . . . . . · 21
Chapter 2 Into the Catacombs: IA-32 . . . . . . . . . . . . . . . . . . 23
2.1 IA-32 Memory Models. . 24
Physical Memory . . . . . . · 25
Flat Memory Model. . . . . . 27
Segmented Memory Model · 27
Modes of Operation. . . 28
2.2 Real Mode. . . . . . . . . . .29
Case Study: MS-DOS . . . . . 30
Isn't This a Waste of Time? Why Study Real Mode? . . . . . . . 32
The Real-Mode Execution Environment . 33
Real-Mode Interrupts .. . . . . .. . · 35
Segmentation and Program Control . . . .38
Case Study: Dumping the IVT . . . . . . .40
Case Study: Logging Keystrokes with a TSR . · 41
Case Study: Hiding the TSR . . . . . . . . . . .45
v
(ontents
vi
Contents
vii
Contents
viii
Contents
ix
Contents
x
Contents
xi
(ontents
xii
Contents
LiveKd.exe . . . . . . . . . · 513
Crash Dumps . . . . . . . . · 513
Hardware-Based Acquisition. · 514
Countermeasures . . . . . . . · 515
Chapter 10 Defeating File System Analysis. . . . . . . . . . 517
10.1 File System Analysis . .. · 517
Forensic Duplication . . . . · 519
Recovering Deleted Files . · 521
Enumerating ADSes . . . . · 521
Acquiring File Metadata . . . 523
Removing Known Good Files. .527
File Signature Analysis . . . . . 529
Static Analysis of an Unknown Executable . 530
Run-time Analysis of an Unknown Executable · 533
10.2 Countermeasures: Overview . .. . .. . .537
10.3 Countermeasures: Forensic Duplication . · 538
Reserved Disk Regions . . . . . . . . . . .538
Live Disk Imaging. . . . . . . . . . . . . . 539
10.4 Countermeasures: Deleted File Recovery. · 542
10.5 Countermeasures: Acquiring Metadata . 544
Altering Timestamps . . . . . . . . . . . . .544
Altering Checksums . . . . . . . . . . . . . .546
10.6 Countermeasures: Removing Known Files · 547
Move Files into the "Known Good" List . · 547
Introduce "Known Bad" Files . .. .. . . .548
Flood the System with Foreign Binaries . . 548
Keep Off a List Entirely by Hiding . . 549
Out-of-Band Hiding .. . . .. . . 549
In-Band Hiding .. . . . . . . . . . . . 555
Application Layer Hiding: M42 . . . .566
10.7 Countermeasures: File Signature Analysis · 567
10.B Countermeasures: Executable Analysis . .568
Foiling Static Executable Analysis . .568
Cryptors . . . . . . .. .. . . .571
Encryption Key Management. . . . . 580
Packers . . . . . . . . .. . . . .. . · 581
Augmenting Static Analysis Countermeasures · 583
Foiling Run-time Executable Analysis . · 585
Attacks against the Debugger. . . . . .586
Breakpoints . . . . . . . . . . . . . . . 586
Detecting a User-Mode Debugger . . · 587
Detecting a Kernel-Mode Debugger. . 588
Detecting a User-Mode or Kernel-Mode Debugger · 588
xiii
(ontents
xiv
Contents
Appendix
Chapter 2 . . . . . . . . 683
Project: KillDOS. . . 683
Project: HookTSR . . 684
Project: HideTSR . · 691
Project: Patch . 696
Chapter 3 . . 697
SSDT .. . . . 697
Chapter 4 . . . . .710
Project: Skeleton (KMD Component). · 710
Project: Skeleton (User-Mode Component) · 714
Project: Installer . · 721
Project: Hoglund. . . . . . . . . . . . 724
Project: SD . . . . . . .. .. .. . . .726
Project: HBeat (Client and Server) . · 729
Project: IRQL . . . . . . . 736
Chapter 5 . . . . . . . . . . . 739
Project: RemoteThread . · 739
xv
Contents
Index . . . . . . . . . . . . . . . . . . . 895
xvi
Disclaimer
The author and the publisher assume no liability for incidental or consequen-
tial damages in connection with or resulting from the use of the information
or programs contained herein.
If you're foolish enough to wake a sleeping dragon, you're on your own.
xvii
Preface: Metadata
In and of itself, this book is nothing more than a couple pounds of processed
wood pulp. Propped open next to the workstation of an experienced software
developer, however, this book becomes something more. It becomes one of
those books that they would prefer you didn't read. To be honest, the MBA
types in Redmond would probably suggest that you pick up the latest publica-
tion on .NET and sit quietly in the corner like a good little software engineer.
Will you surrender to their technical lullaby, or will you choose to handle
more hazardous material?
In the early days, back when an 8086 was cutting-edge technology, the skills
required to undermine a system and evade detection were funneled along an
informal network of Black Hats. All told, they did a pretty good job of sharing
information. Membership was by invitation only and meetings were often
held in secret. In a manner that resembles a guild, more experienced mem-
bers would carefully recruit and mentor their proteges. Birds of a feather, I
suppose; affinity works in the underground the same way as it does for the
Skull and Bones crowd at Yale. For the rest of us, the information accumu-
lated by the Black Hat groups was shrouded in obscurity.
This state of affairs is changing and this book is an attempt to hasten the
trend. When it comes to powerful technology, it's never a good idea to stick
your head in the sand (or encourage others to do so). Hence, my goal over
the next few hundred pages is to present an accessible, timely, and methodi-
cal presentation on rootkit internals. All told, this book covers more topics, in
greater depth, than any other book currently available. It's a compendium of
ideas and code that draws its information from a broad spectrum of sources.
I've dedicated the past two years of my life to ensuring that this is the case.
In doing so I've waded through a vast murky swamp of poorly documented,
xix
Preface: Metadata
xx
Preface: Metadata
AVIEWS (Anti Virus Information and Early Warning System), formally con-
demned Aycock's teaching methodology and admonished the University of
Calgary to revisit the decision to offer such a course. l In their public state-
ment, AVIEN and AVIEWS claimed that:
"The creation of new viruses and other types of rnalware is completely
unnecessary. Medical doctors do not create new viruses to understand how
existing viruses function and neither do anti-virus professionals. It is simply
not necessary to write new viruses to understand how they work and how
they can be prevented. There are also enough viruses on the Internet already
that can be dissected and analyzed without creating new threats. "
In the summer of 2006, Consumer Reports (an independent, nonprofit organi-
zation) drew the ire of the computer security industry when it tested a
number of well-known antivirus packages by hiring an outside firm to create
5,500 variants of existing malware executables. Critics literally jumped out of
the woodwork to denounce this testing methodology. For instance, Igor
Muttik, of McAfee's Avert Labs, in a company blog observed that: "Creating
new viruses for the purpose of testing and education is generally not consid-
ered a good idea - viruses can leak and cause real trouble."
Naturally, as you might have guessed, there's an ulterior motive behind this
response. As Jiirgen Schmidt, a columnist at Heise Security points out, "The
commandment Thou shalt not create new viruses' is a sensible self-imposed
commitment by the manufacturers of antivirus software, which prevents
them from creating an atmosphere of threat to promote their products."2
Listen to the little girl. The king is naked. His expensive new suit of armor is
a boondoggle. The truth is that Pandora's Box has been opened. Like it or
not, the truth will out. As this author can testify, if you're willing to dig deep
enough, you can find detailed information on almost any aspect of malware
creation on the Internet. Issuing ultimatums and intimidating people will do
little to stem the tide. As Mark Ludwig put it in his seminal book The Giant
Black Book of Computer Viruses, "No intellectual battle was ever won by
retreat. No nation has ever become great by putting its citizens' eyes out."
1 http://www.avien.org/publicletter.htm
2 http://www.heise-online.co.uk/security/features/77440
xxi
Preface: Metadata
General Approach
Explaining how rootkits work is a balancing act that involves just the right
amount of depth, breadth, and pacing. In an effort to appeal to as broad an
audience as possible, during the preparation of this book's manuscript I tried
to abide by the following guidelines:
• Include an adequate review of prerequisite material
• Keep the book as self-contained as possible
• Demonstrate ideas using modular examples
xxii
Preface: Meladala
the examples in this book would probably fall into the "training code" cate-
gory. I build my sample code progressively so that I only provide what's
necessary for the current discussion at hand, while still keeping a strong
sense of cohesion by building strictly on what's already been presented.
Over the years of reading computer books, I've found that if you include too
little code to illustrate a concept, you end up stifling comprehension. If you
include too much code, you run the risk of getting lost in details or annoying
the reader. Hopefully I've found a suitable middle path, as they say in Zen.
xxiii
Preface: Metadata
the wary investigator. In doing so, we end up borrowing many tactics that tra-
ditionally have been associated with viruses and other forms of malware.
Part IV examines what might be referred to as "macro issues." Specifically, I
discuss general strategies that transcend any particular software!hardware
platform. I also briefly comment on analogies in the political arena.
Intended Audience
When I was first considering the idea of writing about rootkits, someone
asked me: ''Aren't you worried that you'll be helping the bad guys?" The
answer to this question is a resounding "NO." The bad guys already know
this stuff. It's the average system administrator who needs to appreciate just
how potent rootkit technology can be. Trying to secure the Internet by limit-
ing access to potentially dangerous information is a recipe for disaster.
Ultimately, I'm a broker. What I have to offer in this book is ideas and source
code examples. What you choose to do with them is your business.
Prerequisites
For several decades now, the standard language for operating system imple-
mentation has been C. It started with UNIX in the 1970s and Darwinian
forces have taken over from there. Hence, people who pick up this book will
need to be fluent in C. Granted there will be a load of material related to
device driver development, some x86 assembler, and a modicum of sys-
tem-level APls. It's inescapable. Nevertheless, if I do my job as an author all
you'll really only need to know C. Don't turn tail and run away if you spot
something you don't recognize, I'll be with you every step of the way.
Conventions
In this book, the Consolas font is used to indicate text that is one of the
following:
• Source code
• Console output
• A numeric or string constant
• Filename
• Registry key name or value name
xxiv
Preface: Metadata
I've tried to distinguish source code and console output from regular text
using a grey background. In some cases, particularly important items are
highlighted in black. If an output listing is partial, in the interest of saving
space, I've tried to indicate this using three trailing periods.
int Level;
level = 5;
level++; //thlS lS really lmportant code, It ' S hlghllghted
/*
This is a really long comment .
It goes on and on ...
*/
Registry keys are indicated by a trailing backslash. Registry key values are
not suffixed with a backslash.
HKLM\5Y5TEM\CurrentControlSet\Services\NetBI05\
HKLM\SYSTEM\CurrentControlSet\Services\NetBI05\ImagePath
Words will appear in italic font in this book for the following reasons:
• When defining new terms
• To place emphasis on an important concept
• When quoting another source
• When citing a source
Numeric values appear throughout the book in a couple of different formats.
Hexadecimal values are indicated by either prefixing them with "ex" or
appending "H" to the end. Source code written in C tends to use the former
and IA-32 assembly code tends to use the latter.
9xFF92
9FF92H
xxv
Preface: Metadata
Acknowledgments
As with many things in life, this book is the culmination of many outwardly
unrelated events. In my mind, this book has its origins back in December of
1999 while I was snowed in during a record-breaking winter storm in Minne-
apolis. Surfing at random, I happened upon Greg Hoglund's article inPhrack
magazine, "A *REAL * NT Rootkit, patching the NT Kernel." Though I'll
admit that much of the article was beyond me at the time, it definitely planted
a seed that grew over time.
Without a doubt, this book owes a debt of gratitude to pioneers like Greg who
explored the far corners of the matrix and then generously took the time to
share what they learned with others. I'm talking about researchers like Sven
Schreiber, Mark Ludwig, Joanna Rutkowska, Mark Russinovich, Jamie Butler,
Sherri Sparks, Vinnie Liu, H.D. Moore, the Kumar tag-team over at NVIabs,
Crazylord, and the grugq. A great deal of what I've done in this book builds on
the publicly available foundation of knowledge that these people left behind,
and I feel obliged to give credit where it's due. I only hope this book does the
material justice.
On the other side of the great divide, I'd like to extend my thanks to Richard
Bejtlich, Harlan Carvey, Keith Jones, and Curtis Rose for their contributions
to the field of computer forensics. The books that these guys wrote have
helped to establish a realistic framework for dealing with incidents in the
wild. An analyst who is schooled in this framework, and has the discipline to
follow the processes that it lays out, will prove a worthy adversary to even
the most skilled attacker.
During my initial trial by fire at San Francisco State University, an admin by
the name of Alex Keller was kind enough to give me my first real exposure to
battlefield triage on our domain controllers. For several hours I sat shotgun
with Alex as he explained what he was doing and why. It was an excellent
introduction by a system operator who really knows his stuff. Thanks again,
Alex, for lending your expertise when you didn't have to, and for taking the
heat when your superiors found out that you had.
As usual, greetings are also in order. I'd like to start with a shout out to the
CHHS IT Think Tank at SFSU (Dan Rosenthal, David Vueve, Dylan Mooney,
Jonathan Davis, and Kenn Lau). When it comes to Counter-Strike, those
mopes down at the Hoover Institute have nothing on us! I'd particularly like
to give my respects to the Notorious Lucas Ford, our fearless leader and offi-
cial envoy to Las Vegas; a hacker in the original sense of the word. Mad props
also go to Martin Masters, our covertly funded sleeper cell over in the SFSU
xxvi
Preface: Meladala
0(eX),
Reverend Bill Blunden
www.belowgotham.com
xxvii
Pa rt I Foundations
Chapter 1 Setting the Stage
Chapter 2 Into the Catacombs: IA-32
Chapter 3 Windows System Architecture
Chapter 4 Rootkit Basics
,
1 \
.,
Chapter 1
01010010, 01101111, 01101111, 01110100, 01101011, 01101001, 01110100, 01110011, 001_, 01000011, 01001000, 00110001
In this chapter, we'll see how rootkits fit into the greater scheme of things.
Specifically, we'll look at the etymology of the term rootkit and then discuss
who's using rootkit technology, and to what end. To highlight the discernable
features of a rootkit, we'll contrast them against various types of mal ware and
examine their role in the typical attack cycle. To provide you with an initial
frame of reference, the chapter begins with an examination of the forensic
evidence that was recovered from an attack on one of the machines at San
Francisco State University (SFSU).
3
Chapter 1 / Selling the Stage
backside. The caveat of this mindset is that it tends to allow the smaller fires
to grow into larger fires, until the fires unite into one big firestorm. But, then
again, who doesn't like a good train wreck?
It was in this chaotic environment that I ended up on the receiving end of
attacks that used rootkit technology. A couple of weeks into the job, a
coworker and I found the remnants of an intrusion on a computer that had
been configured to share files. The evidence was stashed in the System
Volume Information directory. This is one of those proprietary spots that
Windows wants you to blissfully ignore. According to Microsoft's online docu-
mentation, the System Volume Information folder is "a hidden system folder
that the System Restore tool uses to store its information and restore
points."! The official documentation also states that "you might need to gain
access to this folder for troubleshooting purposes." Normally, only the operat-
ing system has permissions to this folder and many system administrators
simply dismiss it (making it the perfect place to stash hack tools).
The following series of batch file snippets is a replay of the actions that
attackers took once they had a foothold. My guess is they left this script
behind so they could access it quickly without having to send files across the
WAN link. The attackers began by changing the permissions on the System
Volume Information folder. In particular, they changed things so that every-
one had full access. They also created a backup folder where they could store
files and nested this folder within the System Volume directory to conceal it.
@echo off
xcacls "c: \System Volume Information" IG EVERYONE: F IV
mkdir "c:\System Volume Information\catalog\{GUID}\backup"
The calcsENG. exe program doesn't exist on the standard Windows install.
It's a special tool that the attackers brought with them. They also brought
their own copy of touch. exe, which was a Windows port of the standard
UNIX program.
1 Microsoft Corporation, "How to gain access to the System Volume Information folder,"
Knowledge Base Article 309531, May 7, 2007.
4 I Port I
Chapter 1 / Selling the Stage
> Nole: For the sake of brevity, I have used the string "GUID"
to represent the global un ique identifier
"F7S0E6C3-38EE-ll Dl-8SES-OOC04FC29SEE ."
To help cover their tracks, they changed the timestamp on the System
Volume Information directory structure so that it matched that of the Recycle
Bin, and then further modified the permissions on the System Volume Infor-
mation directory to lock down everything but the backup folder. The tools
that they used probably ran under the System account (which means that
they had compromised the server completely). Notice how they placed their
backup folder at least two levels down from the folder that has DENY access
permissions. This was, no doubt, a move to hide their presence on the com-
promised machine.
touch -g "c: \RECYCLER" "c: \System Volume Infonnation"
touch -g "c: \RECYCLER" "c: \System Volume Infonnation\catalog"
touch -g "c: \RECYCLER " "c: \System Volume Infonnation\catalog\{GUID}"
touch -g "c: \RECYCLER" "c: \System Volume Infonnation\catalog\{GUID}\backup"
After setting up a working folder, they changed their focus to the System32
folder, where they installed several files (see Table 1-1). One of these files
was a remote access program named qttask. exe.
cd\
c:
cd %systemroot%
cd system32
qttask.exe Ii
net start LdmSvc
Port I I5
Chapter 1 / Selling the Stage
Table 1-1
File name Desmptlon
qttask.exe FTP-based command and control server
pWdumpS.exe Dumps password hashes from the SAM database2
lyae.cmm ASCII bannerfile
pci. acx ASCII text, configuration parameters
wci.acx ASCII text, filter sellings of some sort
icp.nls,icw.nls Language support files
libeay32 . dll,ssleay32.dll DLLs used by OpenSSL
svcon. crt PKI certificate used by DLLs3
svcon . key ASCII text, registry key entry used during installation
Once the ITP server was installed, the batch file launched the server. The
qttask. exe executable ran as a service named LdmSvc (the display name was
"Logical Disk Management Service"). In addition to allowing the rootkit to
survive a reboot, running as a service was also an attempt to escape detec-
tion. A harried system administrator might glance at the list of running
services and (particularly on a dedicated file server) decide that the Logical
Disk Management Service was just some special "value-added" OEM
program.
The attackers made removal difficult for us by configuring several key ser-
vices, like RPC and the event logging service, to be dependent upon the
LdmSvc service. They did this by editing service entries in the registry (see
HKLM\SYSTEM\CurrentControlSet\Services). Some of the service registry
keys possess a REG_MUL TI_SZ value named DependOnService that fulfills this
purpose. Any attempt to stop LdmSvc would be stymied because the OS
would protest (i.e., display a pop-up window), reporting to the user that core
services would also cease to function. We ended up having to manually edit
the registry to remove the dependency entries, delete the LdmSvc sub-key,
and then reboot the machine to start with a clean slate.
On a compromised machine, we'd sometimes see entries that looked like:
C:\>reg query HKLM\SYSTEM\CurrentControlSet\Services\RpcSs
HKEY_lOCAl_MACHINE\SYSTEM\CurrentControlSet\Services\RpcSs
DisplayName REG_SZ @oleres.dIl,-se10
Group REG_SZ CCM Infrastructure
ImagePath REG_EXPAND_SZ svchost.exe -k rpcss
2 http://passwords.openwall.netlmicrosoft-windows-nt-2000-xp-2003-vista
3 http://www.openssl.org/
6 I Port I
Chapter 1 I Selling the Stage
Note how the DependOnService field has been set to include LdmSvc, the
faux logical disk management service.
Like many attackers, after they had established an outpost, they went about
securing the machine so that other attackers wouldn't be able to get in. For
example, they shut off the default hidden shares.
net share Idelete C$ Iy
net share Idelete D$ Iy
REM skipping E$ to Y$ for brevity
net share Idelete Z$ Iy
net share Idelete $RPC
net share Idelete $NT
net share Idelete $RA SERVER
net share Idelete $SQL SERVER
net share Idelete ADMIN$ Iy
net share Idelete IPC$ Iy
net share Idelete lwc$ Iy
net share Idelete printS
Years earlier, the college's original IT director had decided that all of the
machines (servers, desktops, and laptops) should all have the same password
for the local system administrator account. I assume this decision was insti-
tuted so that we wouldn't have to remember that many passwords, or be
tempted to write them down. However, once the attackers ran pwdump5, giv-
ing them a text file containing the file server's LM and NTLM hashes, it was
the beginning of the end. No doubt, they brute forced the LM hashes offline
with a tool like John the Ripperi and then had free reign to every machine
under our supervision (including the domain controllers). Game over, they
sank our battleship.
In the wake of this initial discovery, it became evident that Hacker Defender
had found its way onto several of our mission-critical systems and the intrud-
ers were gleefully watching us thrash about in panic. To further amuse
4 http://www.openwall.com/john/
Part I I7
Chapter 1 / Setting the Stage
8 I Port I
Chapter 1 / Selling the Stage
Semantics
What exactly is a rootkit? One way to understand what a rootkit is, and is not,
can be gleaned by looking at the role of a rootkit in the lifecycle of a network
attack (see Figure 1-1). In a remote attack, the intruder will begin by gather-
ing general intelligence on the targeted organization. This phase of the attack
will involve sifting
through bits of infor-
mation like an
organization's DNS
registration and the
public IP address
ranges that they've
been assigned. Once
the Internetfootprint
of the targeted organi- Brute Force- Attack
zation has been (e.,., Ra inbow Tables)
established, the
attacker will use a tool
like Nmap5 try to enu-
merate live hosts, via
ping sweeps or tar-
geted IP scans, and
then examine each
live host for standard Figure 1-1
network services.
After attackers have identified an attractive target and compiled a list of the
services that it provides, they will try to find some way to gain shell access.
This will allow them to execute arbitrary commands and perhaps further
escalate their rights, preferably to that of the root account (though, on a Win-
dows machine sometimes being a power user is sufficient6) . For example, if
the machine under attack is a web server, the attackers might launch a SQL
injection attack against a poorly written web application to compromise the
security of the associated database server. They can then leverage their
access to the database server to acquire administrative rights. Perhaps the
password to the root account is the same as the database administrator's?
In general, the tools used to root a machine will run the gamut from social
engineering, to brute force password cracking, to getting the target machine
5 http://sectools.org
6 Mark Russinovich, "The Power in Power Users," Sysinternals.com/blog, May I , 2006.
Port I I9
Chapter 1 I Setting the Stage
7 McClure, Scambray, Kurtz, Hacking Exposed, 5th Edition, McGraw-Hill Osborne Media, 2005.
10 I Pa rt I
Chapter 1 / Setting the Stage
outpost right under the nose of the system administrator for as long as they
wish.
The manner in which a rootkit is installed can vary. Sometimes it's installed
as a payload that's delivered by an exploit. Other times, it's installed after
shell access has been achieved. In this case the intruder will usually use a
tool like wget8 or the machine's native FTP client to download the rootkit
from a remote outpost. What about your installation media? Can you trust it?
In the pathological case, a rootkit could find its way into the source code tree
of a software product before it hits the customer. Is that obscure flaw really a
bug, or is it a cleverly disguised back door that has been intentionally left
ajar?
8 http://www.gnu.org/software/wget/
9 http://www.nsa.gov/venonalindex.cfm
10 http://www.openssh.org/
Po rt I I 11
Chapter 1 / SeMing the Stage
monitoring and data exfiltration (e.g., Spector Pro and PC Tattletale). What
distinguishes a rootkit from other packages is that it facilitates both of these
features, and it allows them to be performed surreptitiously. When it comes
to rootkits, stealth is the primary concern. Regardless of what else happens,
you don't want to catch the attention of the system administrator. Over the
long run, this is the key to surviving behind enemy lines. Sure, if you're in a
hurry you can crack a server, set up a telnet session with admin rights, and
install a sniffer to catch network traffic. But your victory will be short lived if
you can't conceal what you're doing.
> Note: When it comes to defining a rootkit, try not to get hung up on
implementation details . A rootkit is defined by the services that it provides
rather how it realizes them . This is an important point. Focus on the end
result rather than the means . If you can conceal your presence on a
machine by hiding a process, so be it. But there are plenty of other ways
to conceal your presence, so don't assume that all ro otkits hide processes
(or some other predefined system object) .
The remaining chapters of this book investigate the three services men-
tioned above, though the bulk of the material covered is focused on
concealment: Finding ways to design a rootkit and modifing the operating
system so that you can remain undetected.
Aside
In military parlance, aforce multiplier is a factor that significantly
increases the effectiveness of a fighting unit. For example, stealth
bombers like the B-2 Spirit can attack a strategic target without
the support aircraft that would normally be required to jam radar,
suppress air defenses, and fend off enemy fighters. In the domain
of information warfare, rootkits can be viewed as such - a force
multiplier. By lulling the system administrator into a false sense of
security, a rootkit facilitates long-term access to a machine and
this, in turn, translates into better intelligence.
12 I Po rt I
Chapter 1 I Se"ing the Stage
The Feds
Historically speaking, rookits were originally the purview of Black Hats.
Recently, however, the Feds have also begun to find them handy. For exam-
ple, the FBI developed a program known as Magic Lantern which, according
to reports,ll could be installed via e-mail or through a software exploit. Once
installed, the program surreptitiously logged keystrokes. It's likely that they
used this technology, or something very similar, while investigating reputed
mobster Nicodemo Scarfo Jr. on charges of gambling and loan sharking. 12
According to news sources, Scarfo was using PGP13 to encrypt his files and
the FBI would've been at an impasse without the encryption key. I suppose
one could take this as testimony to the effectiveness of the PGP suite.
The Spooks
Though I have no hard evidence, it would probably not be too far a jump to
conclude that our own intelligence agencies (CIA, NSA, DoD, etc.) have been
investigating rootkits and related tools. In a 2007 report entitled Cybercrime:
The Next Wave, antivirus maker McAfee estimated that some 120 countries
were actively studying online attack strategies. The Chinese, specifically,
were noted as having publicly stated that they were actively engaged in pur-
suiI!g cyber-espionage.
11 Ted Bridis, "FBI Develops Eavesdropping Tools," Washington Post, November 22, 200!.
12 John Schwartz, "U.S. Refu ses to Disclose PC Trackjng," New York Times, August 25, 200l.
13 http://www.gnupg.org/
Port I 113
Chapler 1 I Setting Ihe Slage
The report also quoted Peter Sommer, a visiting professor at the London
School of Economics as saying: "There are signs that intelligence agencies
around the world are constantly probing other governments' networks look-
ing for strengths and weaknesses and developing new ways to gather
intelligence." Sommer also mentioned that "Government agencies are doubt-
less conducting research on how botnets can be turned into offensive
weapons."
Do you remember what I said earlier about rootkits being used as a force
multiplier?
State sponsored hacking? Now there's an idea. The rootkits that I've dis-
sected have all been in the public domain. Many of them are admittedly dicey,
proof-of-concept implementations. I wonder what a rootkit funded by a
national security budget would look like. Furthermore, would McAfee agree
to ignore it just as they did with Magic Lantern?
In its 2008 Report to Congress, the U.S.-China Economic and Security
Review Commission noted that "China's current cyber operations capability
is so advanced, it can engage in forms of cyber warfare so sophisticated that
the United States may be unable to counteract or even detect the efforts."
According to the report, there were some 250 different hacker groups in
China that the government tolerated (if not openly encouraged).
National secrets have always been an attractive target. The potential return
on investment is great enough that they warrant the time and resources nec-
essary to build a military-grade rootkit. For instance, in March of 2005 the
largest cellular service provider in Greece, Vodafone-Panafon, found that four
of its Ericsson AXE switches had been compromised by a rootkit.
The rootkit modified the switches to both duplicate and redirect streams of
digitized voice traffic so that the intruders could listen in on calls. Ironically,
they leveraged functionality that was originally in place to facilitate legal
intercepts on behalf of law enforcement investigations. The rootkit targeted
the conversations of over 100 highly placed government and military officials,
including the prime minister of Greece, ministers of national defense, the
mayor of Athens, and an employee of the U.S. embassy.
The rootkit patched the switch software so that the wiretaps were invisible,
none of the associated activity was logged, and the rootkit itself was not
detectable. Once more, the rootkit included a back door to enable remote
access. Investigators reverse-engineered the rootkit's binary image to create
an approximation of its original source code. What they ended up with was
14 I Po rl I
Chapter 1 I Setting the Stage
roughly 6,500 lines of code. According to investigators, the rootkit was imple-
mented with "a finesse and sophistication rarely seen before or since."14
The Suits
Finally, business interests have also found a use for rootkit technology. Sony,
in particular, used rootkit technology to implement Digital Rights Manage-
ment (DRM) functionality. The code, which installed itself with Sony's CD
player, hid files, directories, tasks, and registry keys whose names begin with
$syS$.15The rootkit also phoned home to Sony's web site, disclosing the
player's ill and the IP address of the user's machine. After Mark
Russinovich, of System Internals fame, talked about this on his blog the
media jumped all over the story and Sony ended up going to court.
When the multinationals aren't spying on you and me, they're busy spying on
each other. Industrial espionage is a thriving business. During the fiscal year
2005, the FBI opened 89 cases on economic espionage. By the end of the
year they had 122 cases pending. No doubt these cases are just the tip of the
iceberg. According to the Annual Report to Congress on Foreign Economic
Collection and Industrial Espionage - 2005, published by the office of the
National Counterintelligence Executive (NCIX), a record number of countries
are involved in pursuing collection efforts targeting sensitive U.S. technology.
The report stated that much of the collection is being done by China and
Russia.
14 Vassilis Prevelakis and Diomidis SpineUis, "The Athens Affair," IEEE Spectrum Online,
July 2007.
15 Mark Russinovich, "Sony, Rootkits and Digital Rights Management Gone Too Far,"
Sysinternals.com, October 31, 2005.
Part I 115
Chapter 1 I Setting the Stage
Granted, this person's problem may not even be virus related. Perhaps all
that is needed is to patch the software. Nevertheless, when things go wrong
the first thing that comes into the average user's mind is "virus."
To be honest, most people don't necessarily need to know the difference
between different types of malware. You, however, are reading a book on
rootkits and so I'm going to hold you to a higher standard. I'll start off with a
brief look at infectious agents (viruses and worms), then discuss adware and
spyware. Finally, I'll complete the tour with an examination of botnets.
Infedious Agents
The defining characteristic of infectious software like viruses and worms is
that they exist to replicate. The feature that distinguishes a virus from a worm
is how this replication occurs. Viruses, in particular, need to be actively exe-
cuted by the user, so they tend to embed themselves inside an existing
program. When an infected program is executed, it causes the virus to spread
to other programs. In the nascent years of the PC, viruses usually spread via
floppy disks. A virus would lodge itself in the boot sector of the diskette,
which would run when the machine started up, or in an executable located on
the diskette. These viruses tended to be very small programs written in
assembly code. 16
Back in the late 1980s, the Stoned virus infected 360 KB floppy diskettes by
placing itself in the boot sector. Any system that booted from a diskette
infected with the virus would also be infected. Specifically, the virus loaded by
the boot process would remain resident in memory, copying itself to any
other diskette or hard drive accessed by the machine. During system startup,
the virus would display the message: "Your computer is now stoned."
Once the Internet boom of the 1990s took off, e-mail attachments,
browser-based ActiveX components, and pirated software became popular
transmission vectors. Recent examples of this include the ILOVEYOU
virus,1 7 which was implemented in Microsoft's VBScript language and trans-
mitted as an attachment named LOVE- LETTER - FOR- YOU. TXT. vbs. Note how
the file has two extensions, one that indicates a text file and the other that
indicates a script file. When the user opened the attachment (which looks like
a text file on machines configured to hide file extensions) the Windows Script
Host would run the script and the virus would be set in motion to spread
16 Mark Ludwig, The Giant Black Book of Computer Viruses, 2nd Edition, American Eagle
Publications, 1998.
17 http://us.mcafee.comivirusinfo/default.asp?id=description&virus_k=98617
16 I Port I
Exploring the Variety of Random
Documents with Different Content
"No, no; you know I never touch such a thing," said Maureen.
"Then whyiver have ye turned so white? Be the powers! ye can't luv
herself?"
"I—I think perhaps—perhaps I do a little," said Maureen. "If she
wouldn't call me 'charity child' I'd love her. Pegeen, darling, what
does charity child mean?"
"Bless yer swate heart, it's what ye'll niver be. Why, there ain't a
bhoy in Ireland that wouldn't stand up and say no to that!"
"Is it very awful?" asked Maureen.
"Don't ax no questions and ye'll be tolt no lies," was Pegeen's
remark.
Maureen remained a minute or two longer in the kitchen, then she
looked at the clock and went slowly up to her shabby bedroom.
"Charity child or not," thought the little girl, "I must try and save her.
It's a long walk, but the day is early yet. I could quiet the poor
O'Shee. I haven't forgotten what father told me. How well I
remember his saying, 'Just a touch of your hand, Maureen, very firm
and very coaxing, and you'll get any horse to follow you round the
world.'" So the child in her little brown frock, which looked
exceedingly shabby, and with a small old, worn-out brown hat to
match, started on her walk to Rathclaren.
Nobody saw her go. The servants, taking advantage of both master
and mistress being absent, were talking loudly in the big kitchen.
The gardeners had joined the group. Pegeen was helping the
company to porter and great chunks of kitchen cake, and they were
all laughing and joking, praising Maureen, shaking their heads
sorrowfully about the masther, and grinning with delight at the way
they hoped The O'Shee would sarve herself.
Pegeen was a confirmed gossip, and told the story of what the child
had just said to her.
"Charity child, indade! Bless her, bless her! Why, I—I'd just die for
the likes uf her," said one of the men; and these remarks were
echoed by both men and women. "Their darling—their Miss Maureen
—their purty—purty wan! Why, now, ain't she just the light o' our
eyes," said one and all.
And meanwhile the dinner for the poor Rector was being destroyed
in the oven, the potatoes and peas were overboiled, and all that
remained of Maureen's nice dinner was a glass dish of piled-up
strawberries and a dish of cream.
"May the Vargin help me! The duck is done to rags!" cried Pegeen.
"Whativer now will Miss Maureen say, and the masther may be back,
bate out, anny minit. Oh, worra, worra, whativer am I to do?"
"I'll kill a fresh wan for yez and pluck it, and ye can push it in the
oven," offered an affectionate gardener, who, according to the Irish
way, preferred any business to his own.
Meanwhile Maureen went rapidly on her way. There was not a bit of
the country that she did not know as though it were a map stretched
out before her. She was therefore able to take several short cuts
through woods rich with summer foliage, where periwinkles and
other flowers of all sorts and descriptions grew in abundance, where
moss pressed softly under her feet, where the birds sang, the doves
cooed, and all nature was at rest and peace.
At another time Maureen would have stood silent in the midst of the
wood and clasped her hands and thanked God for His beautiful
world, but she was too anxious to do anything of the sort now. She
must at any risk, at any cost, save step-auntie. She was a very quick
walker for her age, and got over the ground in great style. Suddenly
she found herself close to Rathclaren, having gone most of the way
through shady woods and dells. Close to the gates of Rathclaren she
distinctly saw the marks of horses' hoofs, but as she examined them
they seemed to be going away from the stately old place. There was
a decided scuffle at the beginning of a boreen or lane, and then the
marks of the said hoofs going very fast indeed.
Maureen clasped her hands in distraction. She knew this boreen. It
was one of the most dangerous in the neighbourhood, and led
straight to the great bog of Anniskail. Suddenly she saw two men
coming to meet her; one was Colonel Herbert, who was always a
special friend of hers, and the other was poor Jacobs, who looked
absolutely wild with distraction and fear.
"Where have you dropped from, baby?" said the pleasant voice of
the Colonel.
"Oh—oh, Colonel Herbert," gasped Maureen, "I know a little bit
about horses, being trained when I was in India, and—and I'm so
terrified about Auntie!—And what are you doing here, Jacobs?" The
child's voice got quite angry. "Why ever are you not with your
mistress?"
"It warn't my fault, missie; it warn't, indade!"
"Oh, don't say whose fault it was. What has happened?"
"She laid the sthroke of the whip acrost me first and thin acrost The
O'Shee, and was it to be wondered at that the baste wouldn't sthand
the whip, niver having tasted it in all his life! He jest shivered from
head to foot, and afore I could git up ahint on the dogcart, he was
off and away like a streak o' greased lightning. She druv him herself
and whipped him all the time. I went up to tell the Colonel and——"
"Don't—don't say any more," said Maureen.—"Colonel, will you help
me?"
"I will, my dear little girl."
"There is Anniskail at the other end of this road," said the child. "Oh,
oh, how am I to bear it!"
"There's my dogcart coming down the avenue, dear. Jump up beside
me, and we'll go straight for the bog. I have ropes and things handy,
and we may pull her out if we don't delay a second."
Maureen, like a little sprite of the air, was soon seated beside the
Colonel on the dogcart. How fast they went—how fast! How close
they got to disaster, to tragedy unspeakable! The Colonel guessed
the worst; he did not attempt to speak. The child shivered but kept
her self-control.
Jacobs and the Colonel's own groom were seated at the back of the
dogcart. Colonel Herbert's powerful horse covered the ground with
right good-will. Almost the whole of the lane was more or less
boggy, and great splashes of soft mud flew up as the dogcart got
over the ground.
Suddenly the Colonel pulled up his horse, threw the reins to his
groom, and motioned to Jacobs to follow him.
"There has been a spill," he said. "It is no sight for little girls. You'd
best stay where you are, Maureen, acushla. We'll do all that human
beings can, and a lot of peasants are there already."
"And do you think I am going to stay behind?" said Maureen. "Oh,
there, I see her pink dress! Oh, poor step-auntie! Yes, I will go—I
will! She has only fallen—she'll be all right. You can't keep me back—
I will go. She may call me charity child every day of her life, but I
don't mind. I'm going to her now."
The Colonel took the little hot hand. There was something
impossible to resist about Maureen.
In a very few minutes they found themselves the centre of a group
of rough-looking men and women.
"Ah, thin, bless yer heart, Colonel dear; ah, thin, it's the neck of her
is broke entirely. See for yer-self. She was a foolish woman. The bog
would have quieted the horse, and she'd have had a few minutes
afore she went under; but no, she'd no sinse at all, at all, and out
she lepped on to that big lot o' stones, and the neck of her was
broke."
"I war the first to find her, sir," said an old peasant. "I saw at wanst
she was as dead as a tenpenny nail, so I tuk her sash and made a
sort o' rope wid it and pulled the poor baste ashore. He's safe
enough is The O'Shee; but herself, glory be to God, she's bruk her
neck! Why, Miss Maureen, I didn't see ye, me darlint; don't ye cry
now!"
"I'm not going to cry," said the child. "Do turn her round very gently.
Do at least try to make her look nice! Poor, poor step-auntie, poor
step-auntie! Colonel, get me some water. I want to wash her face.
Colonel, you must help me to tell Uncle Pat."
The amazing presence of mind of the child soothed the excited Irish
folk. One after another they brought her what she required, and
finally the poor body was laid on a shutter and brought into a cabin
near by. It looked quite peaceful, and no one living had seen that
terrible leap nor heard that most piercing shriek.
"We must leave her here at present," said the Colonel, turning to
Maureen.
"Yes; she and I will stay together," said the child. "She isn't angry
with me any longer. God has taken away her anger. See, she smiles.
You must break it to Uncle Pat, Colonel. I'll stay with her until she
can be moved."
"She shall be moved to my house at Rathclaren," said the Colonel.
"It can easily be managed, my brave little girl. But you can do no
good here. Had you not better come with me?"
"No, no; I'll stay with her. She's not angry with me any longer.
Please, Colonel, be very quick, and don't frighten Uncle Pat, for he's
far from strong."
CHAPTER VI.
COLONEL HERBERT TO THE RESCUE.
There are times in life when the brain ceases to act—that is,
consecutively—when the heart ceases to perform its usual functions,
and when all life, and all that life means, becomes topsy-turvy. This
happened to be the case with little Maureen O'Brien. When she
entered Colonel Herbert's house looking brave and upright, never
shedding a tear nor uttering a sigh, that brave little heart of hers
suddenly gave way. She fell down in a deep and prolonged swoon.
When she came to herself again she was in a small white bed, and
two nurses were taking care of her. She did not recognise the room,
and she did not recognise the nurses. They were of no moment to
her. She passed quickly away again into a sort of trance, not a death
trance by any means, but a fever trance. During that time she talked
a great deal about step-auntie, and said with bright, uplifted eyes: "I
don't mind being a charity child, step-auntie; I don't mind one little
bit."
Uncle Pat came to see her, and so did Dominic, but she did not know
either of them. She kept on with her eternal moan, "I don't mind
being a charity child."
Then grave professional men came and stood by the little white bed
and felt the fluttering pulse, and said gravely that the child was
suffering from shock of a severe description.
Uncle Pat said: "Is Maureen in danger?"
They replied, "Yes, she is in great danger."
Then Uncle Pat took up his abode at Rathclaren, and Colonel Herbert
endeavoured to cheer him all he could. There was a post-mortem
examination on the poor wife who had broken her neck, and then
there was her funeral, which was attended by almost everyone in
the country, for the Irish are great at going to funerals, and do not
need nor expect invitations thereto. They were interested in Mrs.
O'Brien, and, although they had hated her in life, they quite loved
her in death, because her death was so sudden and romantic, and,
in short, what so exactly fitted their Celtic natures.
So Mrs. O'Brien was laid in the old family vault of the O'Briens in
great state and unbounded respect, and the Rector gave away
money freely, and so did Colonel Herbert, and the people got more
drunk than ever that night at public houses; and that was the
earthly end of this miserable woman.
But meanwhile a child, quite a young child, lay close to the eternal
shores, upstairs in Colonel Herbert's house. Very weak she grew and
very faint, and the fever ran high and yet higher, until at last
Dominic, in a fit of ungovernable grief, entered the room without any
leave and held one of the little burning bands between his two
manly ones; and he held it so long and so firmly that the little hand
ceased to struggle and drops of dew came out on the white low
forehead. Then Dominic motioned to the nurse to bring eau de
Cologne and water, and the nurse, wondering at the lad and the
power he showed, obeyed him to the letter.
All night long Dominic stayed by Maureen's side. What he suffered in
body no words can describe, but he would have gone through worse
torture for Maureen.
The doctors came and looked and whispered to each other, and one
said, "This is too wonderful," and the other said, "She is asleep.
Whatever happens, she must not be awakened."
Then the first doctor said to the boy, "Can you bear to kneel just as
you are kneeling all night long?"
And Dominic answered, "I could bear it for every night of my life if it
would save her."
So then the doctors, by Colonel Herbert's desire and by Mr. O'Brien's
desire, supported the lad as best they could with pillows, and gave
him sips of wine to drink, and one of the nurses got him to lean
partly against her. But the cramp which was so slight at first became
terrific, and the boy could have shrieked with agony. But he did not
shriek, he did not stir, for he knew without anyone telling him that
he was saving the life of his little mate.
Dominic knelt by that bedside from six in the evening until six the
following morning, and all that time Maureen slept away her fever
and awoke to consciousness.
"Why, Dom!" she said, in the weak, weak voice of a little bird; but
Dominic was in a dead faint on the floor, and was carried out of the
room without Maureen seeing what happened.
He soon revived and was as well as ever again, but as long as he
lived he never forgot that night when he saved the life of his little
playmate.
From that moment Maureen was pronounced out of danger. A turn
for the better set in, and, although the convalescence was slow, it
was also sure. She was too weary to ask questions, and for the first
week of her recovery she slept most of the time. Then Uncle Pat
came in and kissed her, and she kissed him back and looked into his
sweet, grave eyes, but still she asked no questions, nor did he
volunteer any information.
After that, weeks and weeks and weeks passed, and the summer
entered into autumn and the autumn into winter; and the winter
was a very cold one even for the south of Ireland, but Colonel
Herbert's house was well-warmed and Maureen's room contained
every luxury. The two nurses, Nurse Cecilia and Nurse Hora,
delighted in their life in the luxurious mansion, and Maureen thought
her own deep thoughts.
Autumn passed into winter, and on Christmas day Maureen was well
enough to be dressed in a pretty soft little tea-gown of white
cashmere, which Nurse Nora had made for her. Then she was laid on
the couch by the glowing turf fire, and she was told that Colonel
Herbert would like to see her.
"Oh, but I want to see Uncle Pat," said Maureen. "I'm beginning to
remember things a little. Can I see Uncle Pat, Nurse Cecilia?"
"I don't think you can to-day, my pretty, but the Colonel is very
anxious to have a little chat with you; only first he says you must
have your dinner. Nurse Nora has gone to fetch it now."
Her dinner consisted of a delicious snipe, for these dainty birds
abound in the boggy parts of Ireland; and she had a little glass of
wine, very stimulating and strong. The wine brought the colour into
her sweet cheeks and made her eyes look softer and larger than
ever.
A few minutes later Colonel Herbert entered the room. He was one
of the most distinguished men in the entire county, and Rathclaren
was a perfectly kept place. The Colonel did not know much about
girls or women, however, and was a trifle nervous as he entered the
room, but when he saw the little figure on the sofa, the pink colour
in the cheeks, the soft glow in the brown eyes, the hair which had
been cut off during her illness but was now curling in tight rings all
over her pretty head, made this child of one of his greatest friends
look altogether adorable to him.
Maureen had not lost her straightforward way. She held out a tiny
hand now, which was no longer plump or brown.
"Dear Colonel," she said, "you are good."
"I hate thanks," was the Colonel's reply.
"How funny," said Maureen, with one of her merry laughs; "so do I."
"That's right, my pushkeen; then I quite expect you and I will suit
each other."
"We have always suited each other," said Maureen.
"Yes, that's quite true," replied the Colonel. "And we need not talk of
the past, need we, Maureen, acushla?"
"Why, of course not," said Maureen; "that is," she added, "not unless
you wish to. I am beginning to remember everything now most
beautifully."
"Don't talk of it, child; don't talk of it," said the Colonel.
"I won't—if it really hurts you," said Maureen. "I would not dream of
hurting one so good; but please, dear Colonel—you do not mind my
calling you dear Colonel, do you?"
"Not one little scrap, alanna."
"That is all right," said Maureen. "You must see that I cannot help
loving you. I hope you do not mind that."
"Well—upon my word," replied Colonel Herbert, "I did not know that
any one living loved me."
"Oh! but I do most truly. You see that you are a great soldierly man,
and my father was your friend and the bravest of all brave soldiers.
You see, dear Colonel, we are really close together. I, the daughter
of a soldier; you, a soldier your very self. I cannot help loving you
and feeling close to you, and I hope—I do hope that you do not
mind—I want you to love me oh! so dreadfully badly, and I—well, I
love you with all my heart."
The stern old Colonel never felt tears nearer to his eyes.
"Keep it up, child. I do not mind; in fact, I—I rather like it," he said.
"And may I call you 'dear Colonel'?"
"Yes, young 'un, yes."
"How, please, I have been in your house a long time."
"Since the summer," said the Colonel. "A matter of close on six
months."
"Well, you see, in that time a little girl gets hungry."
"Good gracious! Sakes alive! Don't they give you enough to eat?"
"Oh, yes," said Maureen; "lashins and lavins. But it isn't that hunger.
It's here——" She put her little white hand against her heart. "I'm
hungry for Uncle Pat, and for darling Dominic, and for Denis and
Kitty. When may I see them?"
"That's what I have come to you about, acushla. You see, it is this
way: You had a good bit of serious illness—you're as right as a trivet
now, but it might have been the other way round. Well, things
happened that we needn't talk about, and your Uncle Pat wouldn't
leave the house—not he, blessed man!—while you were in any sort
of danger; but when all the danger was past (and I tell you, alanna,
we did have one night of it)—when it was past and over and you
were quite on the mend, the doctors who were looking after you
took a good haul of him. My word, didn't they pull him about.
Sounding him here and patting him there—they were great men,
these doctors—and they said that if your Uncle Pat went off
immediately to Egypt for the winter—why, he might get well or very
nearly quite well. So, Maureen, you must forgive me; but I made
him go, and there is a curate at Templemore; and as he couldn't go
alone, Dominic went with him, and Denis and Kitty are both at
boarding-school—not the school they used to go to, but a first-rate
one in no less a place than old England; and I says to myself, says I,
'I can't have those bouncing brats back for the holidays; they'll be
too much for Maureen.'"
"They wouldn't," murmured Maureen, but her voice was very low,
and her eyes were really now full of tears, for she was too weak to
keep them back. "They are not bouncing brats, Colonel; they are
darlings!"
"Well, well, child, they may be so to you; but you see I'm an old
bachelor and I have my notions. So it was arranged that the pair of
them should stay at school for the Christmas holidays, and for that
matter for Easter as well; and the long and short of it is this,
Maureen, that you have to put up with the old Colonel until the
warm weather comes and your Uncle returns. For when he finds
Egypt too hot, he is ordered by the doctors to go to different parts
of Switzerland, and the news of him is just of the very best. I have a
letter in my pocket for you, Maureen, written by himself with orders
that I should give it to you on Christmas Day if it was suitable."
"Is this Christmas Day?" cried Maureen.
"Why, yes, baby; have you forgotten everything? I wanted to bring
you up some plum-pudding, but Nurse Cecilia wouldn't allow it.
She's something of a tyrant is that woman, though she's a first-rate
nurse."
"Indeed, she is; and so is Nurse Nora," said the child. "Oh, have I
indeed forgotten so much, and has the time gone by at such a rate
—and aren't you—aren't you sick of me, dear Colonel?"
"Well, this is about the tune of the thing," said Colonel Herbert: "I
have taken a sort of fancy to you! Oh, there, child, for the Lord's
sake! What are you doing?" For Maureen had slipped off her couch
and had twined her weak little arms round the Colonel's neck, and
given the confirmed old bachelor the first kiss he had ever received
since his mother died.
"Child, child, you'll faint, or something awful will happen!"
"No, I won't. I'm not a bit fainty. I want to tell you that I love you"—
here came a kiss—"and you love me"—another kiss.
"To be sure, pushkeen."
"Then that's all right. Put me back on the sofa, dear Colonel, and
then give me Uncle Pat's letter, and then go away, please; only
before you go, will you promise me one thing?"
"What is that, acushla machree?"
"I want you to come to me every day as you have come to-day until
I am well enough to go to you, for we have just an awful lot to do
and talk over before Uncle Pat comes back. Will you promise me,
dear Colonel?"
"Yes, child. God help me, I think I'd promise you anything."
"Then that's all right and I am happy. I think I am about the
happiest little girl in the world. I don't seem to have a care anywhere
at all—only, please, my letter!"
"Yes, baby, only don't for goodness' sake, go and cry over it."
"You don't like cry-babies either," said Maureen.
"Of course not; they are detestable."
"Now my letter, please. Whatever you find in me, you won't find me
a cry-baby."
The Colonel dropped a little packet into the child's bands and softly
left the room.
"'Pon my word," he muttered to himself. "'Pon my word. I never
could abide a wife, but a child like that of my very own, I could put
up with her—'pon my word!"
Maureen lay for a few minutes after Colonel Herbert had left her
with the unopened packet clasped in her two little white bands; and
her eyes looked brighter than ever and her cheeks more rosy. In the
packet were first of all quantities of enormous violets, which could
be put into warm water and would revive by-and-by. Then there
came two letters, one from Dominic and one from Uncle Pat.
Uncle Pat's letter was rather short. It ran somewhat as follows:
"Best of Darlings:—I get grand news of you from that fine fellow,
Herbert, and if you are well enough to receive my Christmas
greeting, here it is for you! The violets are from Dom. He's
turning into a grand lad, and talks French to the manner born.
Oh, what stories I shall have to tell you when I come home, for,
Maureen—dear little Maureen—I am getting well. Each day I
feel stronger. I am quite certain that with God's help I shall be
with you when the long days come round again, and then what
'lashins' we'll have to talk to each other. Meanwhile, it is thought
best for you to stay with the Colonel. You must be very sweet to
him, and not bother him more than you can help; but you might
ask him to lend you some books, for he has got quantities, and
he is quite a famous Egyptologist, and you will like to know
about the place where I am now regaining my health.
"God bless you, my darling. God above keep you!
Uncle Pat."
"P.S.—I send you a cheque for £500 to do what you like with."
The other letter was also short, but it seemed to go straight into
Maureen's heart:
The Colonel had heard those words ages ago, and he now crept
cautiously into the drawing-room and stood behind the little singer.
Certainly her voice was not strong, but it was at that stage of her
growth a high soprano, and very clear and very true, so when she
sang "When Malachi Wore His Collar of Gold," "The Vale of Avoca,"
"Believe Me, if all those Endearing Young Charms," "The Minstrel
Boy," "Those Evening Bells," "Rich and Rare Were the Gems She
Wore," "The Last Bose of Summer," and "The Harp that Once
Through Tara's Halls," the Colonel felt as though he were living in a
new world.
When he discovered Maureen's gift he did not get the piano tuned,
which most men would have done, but got a beautiful new boudoir
grand put in its place; and a master came twice a week from
Kingsala to train a voice that needed no training, for it was Nature's
voice, just as the birds' voices are. Thus the Colonel was intensely
happy. The days sped by, and Maureen's passion for music was
gratified. Evening after evening the "dear Colonel" and Maureen
used to enjoy those incomparable melodies together, the child
singing her heart away, the man listening, never speaking, never
praising, but with his own heart full to the brim of love for this queer
little creature. He loved to spend money on Maureen, and consulted
his excellent housekeeper, and bought the child suitable frocks and
pretty jackets and hats, and when she was strong enough he took
her out riding with him.
The first ride was a bit of a trial to the child, for she could not help
thinking of poor step-auntie and The O'Shee, but after that she
enjoyed herself immensely. To the astonishment of the Colonel, he
found that he had to teach her nothing. She could ride by a sort of
instinct; she was part of her horse. He got her a dark Lincoln green
habit, and a little green velvet cap with a heron's feather in it; and
no sweeter sight could have been seen than the little maid and the
elderly man as they crossed country side by side.
She could ride by a sort of instinct; she was part
of her horse.—Page 85.
But the Colonel knew what Maureen did not, that this golden time in
his life was but an episode, that Maureen did not belong to him, and
that soon—ah! too soon—the sweet presence and the voice like a
bird's, and the lovely brown eyes, would leave Rathclaren and go
back again to old Templemore, where Dominic and his father would
be anxiously waiting for her.
While these things were happening at Rathclaren and Maureen by
no effort at all on her part was making herself the idol of the entire
establishment, the Rector—dear man!—was making leaps and
bounds towards health. The feeling of health was in his veins, the
keenness of health was in his eyes. Egypt had begun to save him,
and Switzerland—selected parts, of course—did the rest of the
business. He would certainly be able to return to his parish duties in
the early summer, just when Templemore was in its prime, when the
fat kine were prosperous, and the lean kine had disappeared for the
present.
The Rector was by no means sorry to live. He had been content to
die—God's will was his—and he never struggled against the
inevitable; but now that earthly life was really restored to him in the
most marvellous and unexpected way, he gave himself up to the
enjoyment of it. His wife's will troubled him, however, not a little. At
first, that is, immediately after her death, it troubled him profoundly,
but then Maureen's severe illness caused every thought, except of
her, to fade from his mind; but when she got better and the danger
passed away, the Rector's conscience smote him very hard with
regard to the will. He went to see Murphy at Kingsala, he went to
see O'More and Walters, and he said the same thing to each and all,
"That will ought not to be acted on. My poor wife died through an
accident. Had she lived she would have altered her will, for she told
me so just before her death, poor dear. In fact, I was supposed to
know nothing of this will, which was made just before our marriage,
when she fancied she loved me; but she certainly told me most
distinctly quite lately that all her money would belong to her own
two daughters. Then she was killed—you know how. The will turned
up. You had a copy, O'More, and we have heard from Debenham
and Druce; but I cannot possibly see how we can act upon it—I
mean as gentlemen and Christians. We take advantage of a terrible
accident to destroy all my poor wife's hopes with regard to her girls."
Then Murphy said, "Now whist awhile, your Reverence, and I'll come
and see you in a few days at Templemore. This requires thinking
over. These aren't the days of chivalry, O'Brien, my man. Go home,
rest quiet, be thankful the life of the little one is spared, and do
nothing until you see me, for I'll come over to Templemore one fine
morning, and have a bit of news for you as like as not."
The Rector waited with what patience he could, and the longer he
waited the more sensitive did his conscience become. But at last, to
his unbounded amazement, Dominic rushed in to inform him that an
outside car was coming down the avenue, and there were four men
on it, to say nothing of the driver; and when the four men stepped
into the old house, which looked most sadly shabby without
Maureen's care, the Rector found himself in the presence of Murphy
the lawyer, of Mr. O'More, Mr. Walters, and of Mr. Debenham, head
of the great firm of solicitors in Chancery Lane.
Now these men began at once to talk to the Rector, and they talked
in a wonderfully convincing way. Their argument was this: First and
foremost, the late Mrs. O'Brien had very much undervalued her
property, which amounted not to fifty thousand pounds, but after all
death duties had been paid would represent the very comfortable
figure of between eighty and ninety thousand pounds. This money,
by the lady's desire, had remained untouched since her second
marriage, and the lawyers, Debenham and Druce, by wise
investments had increased the original capital very much. How by
the terms of the will this sum was to be divided in equal portions
among Mrs. O'Brien's two daughters, the Misses Mostyn, the Rector's
three children and his niece, Maureen O'Brien, and further, an equal
share was to be given to the Rector himself.
"That is precisely how the will stands, Mr. O'Brien," said Debenham,
in his extremely refined English voice, "and as all the inheritors, with
the exception of yourself, are much under age, nothing whatsoever
can be done to alter it until your youngest child comes of age. Now I
drew up this will for the late Mrs. O'Brien. She was most sincere in
her wish at the time that you and yours should share her wealth
with her own two daughters. The fact is, the late Mostyn was old
enough to be her father. He was a city merchant and made his pile,
although it amounted to nothing like what he would have made, had
he not been suddenly stricken down by apoplexy. His wife and he led
a cat-and-dog life together, and I think his death was a great relief
to the poor woman. Anyhow, be that as it may, Mr. O'Brien, you can
part with your share of the property if you like, but the portions set
aside for the children cannot possibly be interfered with. I and my
partner are trustees for the children's share of the property, and I
shall provide them with ample means, which the will allows for their
education, until they each come of age; more I cannot do. They will
each be fairly well off, and I should strongly advise you, Mr. O'Brien,
to take your own share and make no bones about it. The whole
thing seems to me to be an interposition of Providence to prevent an
angry and irresponsible woman from carrying out her designs. You
will all be comfortably off, and I think if she could speak to you now,
she would beg of you not to make your family unhappy by refusing
to receive your share of the profits. After all, Mr. O'Brien, it was you
she loved when she made the will. She did not know the children."
"God help me!" said Mr. O'Brien. "Poor Constance, I never
understood her! If you really think it would please her, sirs——"
"Please her—naturally it would please her!" said O'More.
"And I shall not require it long," continued the Rector, who little
guessed on that sorrowful day that he was to become quite well
once more.
"There is a provision made for that in the will, sir," said Mr.
Debenham, "which gives your share in equal proportions to the six
children, so I do not see how in any case you can touch it or
interfere with it. That's a fine boy of yours," continued Debenham. "I
rather guess that he will make money of his own, and not require
any help from any one."
All these things happened while Maureen was ill, and she naturally
knew nothing about them, and nothing whatever about the little
fortune which had been left her by step-auntie; but as the days flew
on, and April followed March and May followed April, more and more
deeply did Colonel Herbert hate that will, for if it were not in
existence he would simply force O'Brien to give him Maureen to be
his forever, to share his money, his love, and his home.
How it so happened that while the Rector was coming by leaps and
bounds back again to life and health, two girls at school were
mourning not so much for their mother, who, as a matter of fact,
they did not like, but because they were not the heiresses they had
hitherto called themselves to their schoolfellows.
Mr. Debenham called to see these girls, one day, at their showy
school near Dublin. They were like each other, and painfully like the
dead woman. The lawyer could not help uttering a quick sigh when
he saw them. Henrietta was the taller and stronger of the two. She
was what might be described as a "bouncing young maid," very
much developed in figure, with her mother's fiery blue eyes and her
mother's auburn hair which tended to red. That hair was all fluffy
and curly and untidy about her head. She was not a pretty girl; she
had too many freckles for that; and her nose had a little tilt up at the
end, which gave to Henrietta Mostyn a particularly impertinent
appearance. Daisy was very like her sister, but with a difference; her
eyes were smaller and closer together, she had a cunning look about
her, and her hair was of a flaxen shade without a touch of gold in it.
Her eyebrows were the same colour as her hair, and her eyelashes
were white. She was altogether the sort of girl whom you would
rather not know, for there was a cunning, deceitful expression about
her face, which no effort on her part could conceal.
"Well, so we are robbed," said Henrietta. "Poor mumsie-pumsie went
to smash, and we are robbed. That's a nice look-out. Of course,
you'll manage, Mr. Debenham, that those horrid O'Briens don't get
our money."
"They shan't get your money, Miss Mostyn," said the lawyer, "but
they'll get their own."
"Whatever do you mean by that? Then we do get mumsie's fortune.
I said so to Daisy last night. When I want to tease her I call her
Dysy."
"I don't think I care to listen to your remarks," said Mr. Debenham.
"Your poor mother died in a very terrible way."
"Oh, don't tell me, or I'll shriek," said Daisy. "Hold me, Henny, hold
me, Henny; I'll shriek!"
"Silly child," said the lawyer, "have you no self-control? I have
spoken to the head-mistress of your school, Mrs. Henderson, and
she understands that owing to circumstances you are not to remain
here after the summer holidays. That is the wish of your step-father
and guardian, the Reverend Patrick O'Brien. You will probably be
sent to another school, which I will recommend."
"But our money—the chink," said Daisy; "that's the main thing."
"You get your share, Miss Daisy. Your mother's money is divided into
seven portions. Until you come of age, or marry, a certain portion
will be spent on your education. After that the capital will be yours
to do as you wish with. You each of you have, roughly speaking,
about thirteen thousand pounds."
"Is that all?" cried Henrietta. "Why, mumsie said that we were
heiresses!"
"You are, to that extent."
"But she said we should have at least fifty thousand between us,
and she was going to bring us out in Dublin, and we were going to
have no end of larks. What do you mean by saying that we'll have
thirteen thousand pounds each?"
"How old are you, Miss Mostyn?"
"We are both of us fifteen," said Daisy. "Twins, dear little twins. But
please tell us, we want to know what has become of all the rest of
mumsie's money?"
"She left her entire property," said the lawyer, "to be divided into
seven portions. These portions, were to be divided between
yourselves, Mrs. Mostyn's second husband, the Reverend Patrick
O'Brien, his three children, and his dear little niece. None of you can
touch the capital until you come of age. Kitty O'Brien is at present
only six. Her portion, therefore, will in all probability be the largest,
as there will be a greater time for it to accrue. By the way, your
mother made one provision, which I rather fought against, but she
was determined. You are not any of you to come of age until you are
twenty-five."
"Good gracious!" exclaimed Henny.
Daisy burst into tears.
"I'll be a beastly old maid by then," she sobbed.
"Well, good-bye, children, good-bye. Your poor mother is gone, and
you must make the best of what is to you a bad job. But you have
got a delightful step-father, who will do his utmost for you so as to
bring you up in the fear of God, and I am sure you cannot help liking
his dear children."
"If you mean that I am going to like that beastly little niece, you're
fine and mistook, Mr. Lawyer," said Daisy. "I think you are a horrid
man, and I believe, I really do, that you forged that will."
"Good-bye, girls, and don't be silly," said Debenham.
He said to himself as he took his seat in his motor-car: "Poor
O'Brien, I thought his troubles were ended; but I really do not think
I ever saw a more unpleasant pair of girls than the Mostyns. Their
mother over again, only worse. Thank goodness, I've saved O'Brien
from making a fool of himself. That saintly sort of person often does
that kind of thing. That poor, dear, brave little girl, I'm afraid, will
have an awful time when the Mostyns go to Templemore. Why, the
face of the one they call Daisy is as sly and as full of mischief as a
monkey's."
CHAPTER VIII.
SUMMER WITH AN EAST WIND.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebooknice.com