Attacks and brute force · 攻击与暴力破解
How attackers get in
- Beyond malware, attackers use direct attacks. The exam lists several:
- Brute-force attack — trying every possible password until one works.
- Hacking — gaining access without permission, often through a weakness.
攻击者如何入侵
- 除了恶意软件,攻击者还会使用直接的攻击。考试列出了好几种:
- 暴力破解(brute-force) —— 把每一个可能的密码都试一遍,直到有一个成功。
- 黑客攻击(hacking) —— 未经许可获得访问权限,通常是通过某个漏洞。
Attacks on the network
- Data interception — "listening in" on data as it travels, to steal it (a packet sniffer).
- Denial of Service (DoS) — flooding a server with so many requests that it cannot serve real users.
- A DDoS does this from thousands of machines at once, so it is hard to block.
针对网络的攻击
- 数据拦截(data interception) —— 在数据传输途中“窃听”,以盗取它(数据包嗅探器)。
- 拒绝服务(DoS) —— 用海量请求淹没服务器,使它无法为真实用户服务。
- DDoS 则是从成千上万台机器上同时发动,因此很难封堵。
Why short passwords fail
- A 4-digit PIN has only 10,000 combinations. A computer tries millions per second.
- Below, brute-force a PIN by trying every value — then notice how a longer password would have far more combinations.
短密码为什么不行
- 一个 4 位数字 PIN 只有 10,000 种组合。计算机每秒能试上百万次。
- 下面,通过尝试每个值来暴力破解一个 PIN —— 然后想想,更长的密码会有多得多的组合。
The lesson
- Each extra character multiplies the number of guesses needed.
- That is why length is the single most powerful thing about a password — more on that soon.
Covers: IGCSE 5.3 (brute-force, hacking, interception, DDoS).
这一课的启示
- 每多一个字符,都会把所需的猜测次数成倍放大。
- 这正是长度是密码最强大的一点的原因 —— 这一点我们很快会细讲。
涵盖:IGCSE 5.3(暴力破解、黑客攻击、数据拦截、DDoS)。
Common mistakes
- A brute-force attack tries every combination — a longer password makes it far slower.
- Rate-limiting and account lockouts help defend against it.
常见错误
- 暴力破解逐一尝试所有组合——更长的密码让它慢得多。
- 限速和账户锁定有助于防御。
A 4-digit PIN has only 10000 possibilities — a computer can try them all in an instant. Loop through range(10000) and print the value that equals the secret, then stop. · 一个 4 位数字 PIN 只有 10000 种可能 —— 计算机一瞬间就能全部试完。遍历 range(10000),print 出等于 secret 的那个值,然后停止。
Click Run to see the output here. · 点击“运行”查看此处输出。
See why length · 长度 wins. A lowercase-letters password has 26 ** length combinations. Print the number of combinations for length 4, then for length 8 — watch it explode. · 看看长度为什么最重要。一个全小写字母的密码有 26 ** length 种组合。先打印长度为 4 的组合数,再打印长度为 8 的 —— 看它爆炸式增长。
Click Run to see the output here. · 点击“运行”查看此处输出。