Computer and Network Security: Dan Boneh and John Mitchell
Computer and Network Security: Dan Boneh and John Mitchell
Computer and Network Security: Dan Boneh and John Mitchell
Computer and
Network Security
https://courseware.stanford.edu/pg/courses/CS155
What’s this course about?
Intro to computer and network security
Some challenging fun projects
Learn about attacks
Learn about preventing attacks
Lectures on related topics
Application and operating system security
Web security
Network security
System
Alice Attacker
Security is about
Honest user (e.g., Alice, Bob, …)
Dishonest Attacker
How the Attacker
Disrupts honest user’s use of the system (Integrity, Availability)
Learns information intended for Alice only (Confidentiality)
Network security
Network Attacker
System
Intercepts and
controls network
communication
Alice
Web security
System
Web Attacker
Sets up malicious
site visited by
victim; no control
of network
Alice
Operating system security
OS Attacker
Controls malicious
files and
applications
Alice
System
Alice Attacker
Propagation
Compromised host activity
Network probe and other activity
Recognizable activity on newly infected host
Recent work on malware distribution
• Blogs are widely used
- 184 Million blogs world-wide
- 73% of internet users have read a blog
- 50% post comments
• Blogs have automated Linkbacks
- Facilitate cross-referencing
- Exploited by spammers
• We carried out a 1-year study
- Analyzed 10 million spam samples
- Gained insight on attacker’s method of operation and resources
- Propose a defense against blog spams
How big is the problem?
Source: Akismet.com
– TrojanDownloader:Win
32/Zlob.gen!dll
– Trojan.Popuper.origin
– Downloader.Zlob.LI
Trackback spam example
Apparent Bayesian poisoning against spam
filters:
[title] => Please teacher hentai pics
[url] =>http://please-teacher-hentai-
pics.howdsl.nx.cn/index.html
[excerpt] => pics Please teacher hentai pics
...
[blog_name] =>Please teacher hentai pics
Number of notifications detected
Mar-Apr May-
Mar-AprMay-Jun July 2007-Apr 2008
2007 Jun July 2007-Apr 2008
2007 2007
2007
Number of IP Addresses
Mar-AprMay-
Mar-Apr May-Jun July 2007-Apr 2008
2007 Jun
2007 2007 July 2007-Apr 2008
2007
Origin
July 2007-
Mar-Apr 2007 May-Jun 2007
Apr 2008
Mar-
Mar-AprMay-
May-Jun
Jul July
2007-Apr 20082008
2007-Apr
Apr
2007 Jun2007
2007 2007
Web attack toolkit: MPack
Basic setup
Toolkit hosted on web server
Infects pages on that server
Page visitors get infected
Features
Customized: determines
exploit on the fly, based on
user’s OS, browser, etc
Easy to use: management
console provides stats on
infection rates
Customer care toolkit can be
purchased with one-year
support contract!
SilentBanker
See http://www.securityevaluators.com/iphone/
iPhone security measures
“Reduced attack surface”
Stripped down and customized version of Mac OS X
does not have common binaries such as bash, ssh, or even ls.
MobileSafari - many features of Safari have been removed
No Flash plug-in, many file types cannot be downloaded
Some internal protection
If USB syncing with iTunes, file system cannot be mounted
File system accessible to iTunes is chroot’ed
Weak security architecture
All processes of interest run with administrative privileges
iPhone does not utilize some widely accepted practices
Address randomization
Each time a process runs, the stack, heap, and executable code located at
precisely the same spot in memory
Non-executable heaps
Buffer overflow on heap can write executable instructions
Analysis methods
Extract and statically analyze binaries
Using jailbreak and iPhoneInterface,
Audit related open-source code
MobileSafari and MobileMail applications are based
on the open source WebKit project
Dynamic analysis, or “fuzzing”
Sending malformed data to cause a fault or crash
Look at error messages, memory dump, etc.
MobileSafari attack discovered using fuzzing
What kind of vulnerability do you think it was?
Suggestions for improvement
Run applications as an unprivileged user
This would result in a successful attacker only gaining the rights of
this unprivileged user.
chroot apps to prevent access to unrelated data
MobileSafari does not need access to email or SMS msgs
MobileMail deos not need access to browsing history
Add heap and stack address randomization
This will serve to make the development of exploits for
vulnerabilities more difficult
Memory protection: no pages both writable and executable
See http://www.securityevaluators.com/iphone/exploitingiphone.pdf
•Spam service
•Rent-a-bot
•Cash-out
•Pump and dump
•Botnet rental
Underground goods and services
Rank Last Goods and services Current Previous Prices
1 2 Bank accounts 22% 21% $10-1000
2 1 Credit cards 13% 22% $0.40-$20
3 7 Full identity 9% 6% $1-15
4 N/R Online auction site 7% N/A $1-8
accounts
5 8 Scams 7% 6% $2.50/wk - $50/wk
(hosting); $25 design
6 4 Mailers 6% 8% $1-10
7 5 Email Addresses 5% 6% $0.83-$10/MB
8 3 Email Passwords 5% 8% $4-30
9 N/R Drop (request or offer) 5% N/A 10-50% of drop amount
10 6 Proxies 5% 6% $1.50-$30
retval = -EINVAL;
Looks like a standard error check
Anyone see the problem?
See: http://lwn.net/Articles/57135/
Example #2
Rob Harris case - slot machines
an insider: worked for Gaming Control Board
Malicious code in testing unit
when testers checked slot machines
downloaded malicious code to slot machine
was never detected
special sequence of coins activated “winning mode”
Caught when greed sparked investigation
$100,000 jackpot
Example #3
Breeder’s cup race
Upgrade of software to phone betting system
Insider, Christopher Harn, rigged software
Allowed him and accomplices to call in
change the bets that were placed
undetectable
Caught when got greedy
won $3 million
http://horseracing.about.com/library/weekly/aa110102a.htm
Software dangers
Software is complex
top metric for measuring #of flaws is lines of code
Windows Operating System
tens of millions of lines of code
new “critical” security bug announced every week
Unintended security flaws unavoidable
Intentional security flaws undetectable
Ken Thompson
What code can we trust?
Consider "login" or "su" in Unix
Is RedHat binary reliable?
Does it send your passwd to someone?
Can't trust binary so check source, recompile
Read source code or write your own
Does this solve problem?