Chrome 沙盒逃逸

2020-6-4
原文链接

阅读全文

固件解包小结

Squashfs 文件系统

该文件系统,注意是依据头部的Magic值来识别。常见的有:sqsh,hsqs,qshs,shsq,hsqt,tqsh,sqlz 7种。

根据头部偏移第25个byte位置的值,来确定压缩的版本。

阅读全文

BUCTF.web.14-20

[De1CTF 2019]SSRF Me point 1

题目说是ssrf,看看先。访问一下是一串代码。排版后重新看看。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#! /usr/bin/env python
#encoding=utf-8
from flask import Flask
from flask import request
import socket
import hashlib
import urllib
import sys
import os
import json
reload(sys)
sys.setdefaultencoding('latin1')

app = Flask(__name__)

secert_key = os.urandom(16)

class Task:
def __init__(self, action, param, sign, ip):
self.action = action
self.param = param
self.sign = sign
self.sandbox = md5(ip)
if(not os.path.exists(self.sandbox)): #SandBox For Remote_Addr
os.mkdir(self.sandbox)

def Exec(self):
result = {}
result['code'] = 500
if (self.checkSign()):
if "scan" in self.action:
tmpfile = open("./%s/result.txt" % self.sandbox, 'w')
resp = scan(self.param)
if (resp == "Connection Timeout"):
result['data'] = resp
else:
print resp
tmpfile.write(resp)
tmpfile.close()
result['code'] = 200
if "read" in self.action:
f = open("./%s/result.txt" % self.sandbox, 'r')
result['code'] = 200
result['data'] = f.read()
if result['code'] == 500:
result['data'] = "Action Error"
else:
result['code'] = 500
result['msg'] = "Sign Error"
return result

def checkSign(self):
if (getSign(self.action, self.param) == self.sign):
return True
else:
return False

#generate Sign For Action Scan.
@app.route("/geneSign", methods=['GET', 'POST'])
def geneSign():
param = urllib.unquote(request.args.get("param", ""))
action = "scan"
return getSign(action, param)

@app.route('/De1ta',methods=['GET','POST'])
def challenge():
action = urllib.unquote(request.cookies.get("action"))
param = urllib.unquote(request.args.get("param", ""))
sign = urllib.unquote(request.cookies.get("sign"))
ip = request.remote_addr
if(waf(param)):
return "No Hacker!!!!"
task = Task(action, param, sign, ip)
return json.dumps(task.Exec())
@app.route('/')
def index():
return open("code.txt","r").read()

def scan(param):
socket.setdefaulttimeout(1)
try:
return urllib.urlopen(param).read()[:50]
except:
return "Connection Timeout"

def getSign(action, param):
return hashlib.md5(secert_key + param + action).hexdigest()

def md5(content):
return hashlib.md5(content).hexdigest()

def waf(param):
check=param.strip().lower()
if check.startswith("gopher") or check.startswith("file"):
return True
else:
return False

if __name__ == '__main__':
app.debug = False
app.run(host='0.0.0.0',port=80)

阅读全文

BUUCTF.web.1-13

[HCTF 2018]WarmUp point 1

题目说代码审计。
打开题目是个滑稽图片,右键源码看有个注释

1
<!--source.php-->

阅读全文

CTf-JarvisOJ-250-300

Login 250

题目是一个登陆框,输入密码,输错会报错。
抓包,发现返回包有

1
2
3
Perl/v5.16.3
X-Powered-By: PHP/5.6.21
Hint: "select * from `admin` where password='".md5($pass,true)."'"

阅读全文

CTf-JarvisOJ-100-200

API调用 100

URL: http://web.jarvisoj.com:9882/

阅读全文

DIR842-qemu

DIR842 A1 qemu 模拟

需要的 qemu 文件:debian_squeeze_mips_standard.qcow2,vmlinux-2.6.32-5-4kc-malta

首先修改一下自己虚拟机的IP,C段设成0,比如:192.168.0.142
然后使用命令:

阅读全文

cJson源码分析

cJosn

看 cJson 源码之前,先了解下 Json 的格式。

json 格式

官方中文翻译:http://www.json.org/json-zh.html

阅读全文

firmware-uncompress

在调试一些固件的时候,发现它们的包binwalk识别不了,解不出来。这个时候就要另外想办法。
下面例举2个我遇到的情况。

1. 某 openwrt bin ,binwalk无法识别

Binwalk xxx.bin

阅读全文

CVE-2019-5782










阅读全文