当前位置:网站首页>Attack and defense world misc practice area (simplerar, base64stego, no matter how high your Kung Fu is, you are afraid of kitchen knives)
Attack and defense world misc practice area (simplerar, base64stego, no matter how high your Kung Fu is, you are afraid of kitchen knives)
2022-07-06 14:06:00 【Unknown white hat】
Catalog
png Partial block 7A Change it to 74
Found to be gif Format , Rename it and use PhotoShop open , Found two blank layers
function python Script decoding
No matter how high your Kung Fu is, you are afraid of kitchen knives
Use binwalk I found a in the flow packet Zip Compressed package
Right click to track byte stream
SimpleRAR
Topic introduction
Their thinking
Open the attachment
No useful data found
winhex open RAR file
winhex Tools
link :https://pan.baidu.com/s/1XCIKvAwewZ3o_l0EX_DFFA
Extraction code :qqzg
png Partial block 7A Change it to 74
Unzip the file
winhex Open the picture
You can see from the content that this is a gif chart
Found to be gif Format , Rename it and use PhotoShop open , Found two blank layers
Extract the two layers separately , use StegSolve open , Keep clicking on the arrow until the image appears
Splice the two QR codes together and complete the locating points , Scan the QR code to get flag
find flag
flag{yanji4n_bu_we1shi}
base64stego
Topic introduction
Their thinking
Open the attachment
Try decompression
Need a password
winhex Open compressed file
Find hexadecimal values --504B-- List search results -- determine , Find out zip For pseudo encryption
take 09 00 Change it to 00 00
Decompression acquisition
U3RlZ2Fub2dyYXBoeSBpcyB0aGUgYXJ0IGFuZCBzY2llbmNlIG9m
IHdyaXRpbmcgaGlkZGVuIG1lc3NhZ2VzIGluIHN1Y2ggYSB3YXkgdGhhdCBubyBvbmV=
LCBhcGFydCBmcm9tIHRoZSBzZW5kZXIgYW5kIGludGVuZGVkIHJlY2lwaWVudCwgc3VzcGU=
Y3RzIHRoZSBleGlzdGVuY2Ugb2YgdGhlIG1lc3M=
YWdlLCBhIGZvcm0gb2Ygc2VjdXJpdHkgdGhyb3VnaCBvYnNjdXJpdHkuIFS=
aGUgd29yZCBzdGVnYW5vZ3JhcGh5IGlzIG9mIEdyZWVrIG9yaWdpbiBhbmQgbWVhbnMgImNvbmNlYW==
bGVkIHdyaXRpbmciIGZyb20gdG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oZWxkIGNh
cHRpdmUgYnkgdGhlIE5vcnRoIEtvcmVhbnMuIEluIG90aGVyIHBob3Rv
cyBwcmVzZW50ZWQgdG8gdGhlIFVTLCBjcmV3IG1lbWJlcnMgZ2F2ZSAidGhlIGZpbmdlciIgdG8g
dGhlIHVuc3VzcGVjdGluZyBOb3J0aCBLb3JlYW5zLCBpbiBhbiBhdHRlbXB0IHRvIE==
ZGlzY3JlZGl0IHBob3RvcyB0aGF0IHNob3dlZCB0aGVtIHNtaQ==
bGluZyBhbmQgY29tZm9ydGFibGUuDQoNCi0tDQpodHRwOi8vZW4ud2lraXBlZGlhLm9yZw==
L3dpa2kvU3RlZ2Fub2dyYXBoeQ0K
function python Script decoding
python Script
import re
import base64
b64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
# stego.txt To be decrypted base64 The file where the steganographic string is located
f = open('F://stego.txt','r')
base64str = f.readline()
# pattern2 When used to match two equal signs , One character before the equal sign
# pattern2 When used to match an equal sign , One character before the equal sign
pattern2 = r'(\S)==$'
pattern1 = r'(\S)=$'
# The extracted steganographic binary characters are added binstring in
binstring = ''
# Read the to be decrypted line by line base64 Steganography string , Deal with line by line
while(base64str):
# First match two equal signs , If it doesn't match , Configure an equal sign
# If there is no equal sign , There is no hiding , No need to deal with
if re.compile(pattern2).findall(base64str):
# mstr Is a character before the equal sign , This character is the character where the binary information is hidden
mstr = re.compile(pattern2).findall(base64str)[0]
# confirm mstr Character corresponding base64 Binary number , Assign a value to mbin
mbin = bin(b64chars.find(mstr))
# mbin The format is as follows 0b100,mbin[0:2] by 0b
# mbin[2:].zfill(6) For will 0b The following binary numbers are supplemented by 0, send 0b The length of the back is 6
mbin2 = mbin[0:2] + mbin[2:].zfill(6)
# Two equal signs are hidden 4 Bit binary number , So extract mbin2 After 4bit
# Assign a value to stegobin, This is the hidden binary information
stegobin = mbin2[-4:]
binstring += stegobin
elif re.compile(pattern1).findall(base64str):
mstr = re.compile(pattern1).findall(base64str)[0]
mbin = bin(b64chars.find(mstr))
mbin2 = mbin[0:2] + mbin[2:].zfill(6)
# An equal sign condition is hidden 2 Bit binary number , So extract mbin2 After 2bit
stegobin = mbin2[-2:]
binstring += stegobin
base64str = f.readline()
# stegobin Concatenate the hidden binary characters in each line
# From 0 Bit start ,8bit、8bit Handle , therefore range Step by step is 8
for i in range(0,len(binstring),8):
# int(xxx,2), Convert binary string to 10 Base integers , Reuse chr() To a character
print(chr(int(binstring[i:i+8],2)),end='')
print()
Run script
find flag
flag{Base_sixty_four_point_five}
No matter how high your Kung Fu is, you are afraid of kitchen knives
Topic introduction
Their thinking
Use binwalk I found a in the flow packet Zip Compressed package
Detach attachment
obtain flag, You need a password to open
Wireshark Open the attachment
Search for flag.txt
Right click to track byte stream
Find out FFD8
FFD8FF yes jpg Beginning of file
find DDF9
Find at the end FFD9
With FF D8 start 、FF D9 Copy this part at the end , And in winhex Create a new file in and paste , Note that the paste format is ASCII Hex
Open the picture
get flag.txt Open password
Input Th1s_1s_p4sswd_!!!
find flag
flag{3OpWdJ-JP6FzK-koCMAK-VkfWBq-75Un2z}
边栏推荐
- Record once, modify password logic vulnerability actual combat
- Using spacedesk to realize any device in the LAN as a computer expansion screen
- HackMyvm靶机系列(5)-warez
- XSS之冷门事件
- Middleware vulnerability recurrence Apache
- UGUI—Text
- Experiment five categories and objects
- 7-6 local minimum of matrix (PTA program design)
- 7-9 制作门牌号3.0(PTA程序设计)
- Spot gold prices rose amid volatility, and the rise in U.S. prices is likely to become the key to the future
猜你喜欢
随机推荐
实验五 类和对象
7-11 mechanic mustadio (PTA program design)
Hackmyvm target series (3) -visions
JS several ways to judge whether an object is an array
Using qcommonstyle to draw custom form parts
7-1 output all primes between 2 and n (PTA programming)
Record once, modify password logic vulnerability actual combat
7-4 散列表查找(PTA程序设计)
Differences among fianl, finally, and finalize
Programme de jeu de cartes - confrontation homme - machine
Brief introduction to XHR - basic use of XHR
Yugu p1012 spelling +p1019 word Solitaire (string)
中间件漏洞复现—apache
Attach the simplified sample database to the SQLSERVER database instance
7-14 错误票据(PTA程序设计)
强化学习基础记录
[MySQL table structure and integrity constraint modification (Alter)]
内网渗透之内网信息收集(一)
强化学习基础记录
Implementation principle of automatic capacity expansion mechanism of ArrayList