【RoarCTF 2019】Easy Calc 1
[RoarCTF 2019]Easy Calc 1title是一个 简单的计算器
好像是yoshino-s老师,太厉害了!!!
存在waf并且有一个calc.php界面:
<?phperror_reporting(0);if(!isset($_GET['num'])){ show_source(__FILE__);}else{ $str = $_GET['num']; $blacklist = [' ', '\t', '\r', '\n','\'', '"', '`', '\[', '\]','\$','\\','\^']; foreach ($blacklist as $blackitem) { ...
【NSSCTF】2021SWPU-crypto
[TOC]
总览
crypto1源码:
from gmpy2 import *from Crypto.Util.number import *flag = '****************************'flag = {"asfajgfbiagbwe"}p = getPrime(2048)q = getPrime(2048)m1 = bytes_to_long(bytes(flag.encode()))e1e2 = 3087n = p*qprint()flag1 = pow(m1,e1,n)flag2 = pow(m1,e2,n)print('flag1= '+str(flag1))print('flag2= '+str(flag2))print('n= '+str(n))#flag1= 463634070971821449698012827631572665302589213868521491855038966879005784397309389922 ...
【TSW】2021迎新赛writeup
[TOC]
希望我们都能永远记得当下!
签到
直接扫码就可以了。
WEB
web0.1
直接修改
X-Forwarded-For: 127.0.0.1
web0.2
可以下载flag.txt,但是打开后并不是。
这道题的考点是可以使用file协议下载文件:
payload: ?file=flag.php
打开的源码:
<?phpheader('Content-Type: text/html; charset=utf-8'); //网页编码function encrypt($data, $key) { $key = md5 ( $key ); $x = 0; $len = strlen ( $data ); $l = strlen ( $key ); for($i = 0; $i < $len; $i ++) { if ($x == $l) { $x = 0; } $char .= $key {$x}; $x ++; } for($i = 0; $i < ...
【BUUCTF】[ACTF2020 新生赛]Include
[TOC]
[ACTF2020 新生赛]Include考察利用php://filter伪协议进行文件包含
构造payload = http://5165ec02-c72d-4737-85c5-295e639ea759.node3.buuoj.cn/?file=php://filter/read=convert.base64-encode/resource=flag.php
http://5165ec02-c72d-4737-85c5-295e639ea759.node3.buuoj.cn/?file=php://filter/read=convert.base64-encode/resource=flag.php
[NPUCTF2020]ezinclude
<html><!--md5($secret.$name)===$pass --></html>
疑似MD5哈希长度拓展攻击,在响应包里面给出啦pass的值
【BUUCTF】[极客大挑战 2019]PHP
[TOC]
[极客大挑战 2019]PHP打开网页是一个很可爱的小猫咪,提到了备份网站
在linux中使用disearch.py进行目录扫描。
搜索到了www.zip
下载解压,查看目录结构:
分析class.php:
<?phpinclude 'flag.php';error_reporting(0);class Name{ private $username = 'nonono'; private $password = 'yesyes'; public function __construct($username,$password){ $this->username = $username; $this->password = $password; } function __wakeup(){ $this->username = 'guest'; } ...
【NSSCTF】2021SWPU-web
[TOC]
SWPU:web:gift_F12:直接查看源码:
easy_md5数组绕过
<?php highlight_file(__FILE__); include 'flag2.php'; if (isset($_GET['name']) && isset($_POST['password'])){ $name = $_GET['name']; $password = $_POST['password']; if ($name != $password && md5($name) == md5($password)){ echo $flag; } else { echo "wrong!"; } }else { echo 'wrong!';}?>N ...
网刃杯2021-签到
[TOC]
我整理这道题的目的是学习工具使用以及python练习。
首先解压压缩包得到两个txt文件:
查看内容:
cipher.txt:U2FsdGVkX1+WTSHujcCjvHj/gcwL0C7u37XtW4idGcpci3H913I=
flag.txt:
看似正常,但是一复制的结果:
welcome to wang ren, hope you have a good time!
里面有一些奇奇怪怪的东西,
查看一下属性:
cipher.txt 52字节
flag.txt 506字节
原来是零宽字符,并且由flag.txt的名字可以得到应该是一个tip.
工具解密:首先找到一个:
工具箱
但是不好使:
接着就是第二个工具:
零宽度字符隐写 ...
【BUUCTF】BUU-SQL-COURSE-1
[TOC]
【BUUCTF】BUU SQL COURSE 1 &&这是一道比较基础的题目,但是它和普通的注入有所区别。
点击测试新闻1,2,3:
只有登陆界面可能存在注入,
但是经过各种尝试并未发现注入点
经过再次寻找发现network种有content_list.php
并且在刚刚的测试新闻界面发现注入点:
访问此页面:
首先查字段:url?id = 1 order by 2不报错
url?id = 1 order by 3不回显
所以有两个字段,接下来使用联合查询:
url?id = 1 union select 1,2
查询数据库名:url?id=0 union select 1,database()
这里id对应的值不要是1、2、3,他们是测试新闻页面下本就有的,如果想要得到数据库名还得用之外的数字。
在这里得到数据库名为:news
同理也可以得到想要的数据库版本和用户
查数据库下的表名:url?id=0 union select 1,table_name from information_schema.tables where table ...