攻防世界XCTF-MISC入门12题解题报告

MISC属于CTF中的脑洞题,简直就是信息安全界的脑筋急转弯。你说它渣,它也有亮点,不好评说。这块最亮眼的入门题就属隐写术,出题人骚的狠。但是我感觉未来其中一个重点,就是大数据安全,从海量流量中捕获恶意流量,比如流量中有一个常见的OWASP10攻击,flag就藏在恶意流量里面,找到攻击就找到flag。准备大年30晚上把这块吃掉。写文章不容易,求三连。感谢小伙伴们了,祝点赞的小伙伴2024年好事连连~

攻防世界XCFT刷题信息汇总如下:攻防世界XCTF黑客笔记刷题记录

第一题:送分题

img

解题报告:

复制粘贴flag,就通过了,啧啧

flag{th1s_!s_a_d4m0_4la9}

第二题:考察pdf隐写

img

解题报告:

将pdf转为txt就看到flag咯

pdftotext ad00be3652ac4301a71dedd2708f78b8.pdf q.txt

img

第三题:考察组合加密

img

第一步:与佛论禅

img

第二步:rot13[1]

img

第三步:base64解码

img

第四题:考察GIF隐写

img

解题报告:

第一步:观察gif动画,发现第50帧有一个残缺的二维码

img

第二步:导出这一帧,并手动画上小正方形,补全二维码

感叹我是个灵魂画手~

img

第三步:手机微信扫一扫,哎,flag就到手啦

flag{e7d478cf6b915f50ab1277f78502a2c5}

第五题:考察java反编译

img

解题报告:

第一步:jar包解压缩

unzip -qo 9dc125bf1b84478cb14813d9bed6470c.jar -d classes

第二步:java反编译

jad -o -r -sjava -dsrc 'cn/**/*.class' > /dev/null 2>&1

第三步:字符串搜索flag

grep "flag" . -rn

img

第四步:base64解码获得最终flag

flag{DajiDali_JinwanChiji}

img

第六题:考察二进制隐写

img

解题报告:

第一步:查看发现有104张jpg黑白图片,有点像2进制里的0和1

104/8=13,也就是说有13个数字,那不就是flag吗?

第二步:听说你是一张图片一张图片看,人肉转换黑白为01或10?

编写一口气脚本,不求人:

from PIL import Image
seq1=""
seq2=""
for i in range(104):
    filename = str(i)+".jpg"
    img = Image.open(filename)
    clrs = img.getcolors()
    if sum(clrs[0][1])>400:
        seq1+="0"
        seq2+="1"
    else:
        seq1+="1"
        seq2+="0"

def getflag(seq1):
    a1 = ""
    for i in range(104/8):
        s1 = seq1[:8]
        seq1 = seq1[8:]
        i1 = int(s1,2)
        a1 += chr(i1)
    return a1


print(getflag(seq1))
print(getflag(seq2))

img

第七题:考察进制转换

img

解题报告:

第一步:一眼看上去就是16进制鸭

转成10进制,发现还不是ascii码,凯撒移位了

200,233,172,160,198,242,229,243,232,196,239,231,161,160,212,232,229,160,230,236,225,231,160,233,243,186,160,232,234,250,227,249,228,234,250,226,234,228,227,234,235,250,235,227,245,231,233,243,228,227,232,234,249,234,243,226,228,230,242,

第二步:一口气脚本,不求人:

ascii码的范围是32到128,这题的flag格式是:flag{xxxxx},坑。

s0="c8e9aca0c6f2e5f3e8c4efe7a1a0d4e8e5a0e6ece1e7a0e9f3baa0e8eafae3f9e4eafae2eae4e3eaebfaebe3f5e7e9f3e4e3e8eaf9eaf3e2e4e6f2"
for i in range(100,150):
    flag=""
    s = s0
    while s:
        tmp = s[:2]
        ch = chr(int(str(tmp),16)-i)
        s=s[2:]
        flag += ch
    if all(ord(c) < 127 and ord(c)>31 for c in flag):
        print(flag)

img

第八题:考察图片隐写

img

解题报告:

第一步:解压rar文件,发现一个损坏,使用bless打开rar文件

img

第二步:发现隐藏的图片,修改A8 3C 7AA8 3C 74

img

第三步:解压成功,开始正题

img

先打开图片看看是什么鬼吧,结果发现打不开,这是什么神仙图片?

img

查看文件类型,发现是gif:

img

修改后缀名为gif,发现有2帧:

img

第四步:使用StegSolve打开,为啥我看2张结果都长这样?喵,有大佬解释解释吗?

img

经过评论区大佬

@丙乙

的提醒,从第二张图中分离出来上半部分。

img

反正就是得到2张二维码,扫一扫就拿到flag了。

第九题:考察base64隐写

img

第一步:发现要输入解压密码

img

说实话吧,在Kali Linux做MISC真的太浪费时间了,各种不友好

绕过ZIP伪加密的方法可以参考github[2]

java -jar ZipCenOp.jar r xxxxx.zip

顺便说一下,用360压缩可以直接解开哦~

第二步:base64解码

解码后都是英文的:

Steganography is the art and science of writing hidden messages in such a way that no one, apart from the sender and intended recipient, suspects the existence of the message, a form of security through obscurity. The word steganography is of Greek origin and means "concealed writing" from the Greek words steganos meaning "covered or protected", and graphein meaning "to write". The first recorded use of the term was in 1499 by Johannes Trithemius in his Steganographia, a treatise on cryptography and steganography disguised as a book on magic. Generally, messages will appear to be something else: images, articles, shopping lists, or some other covertext and, classically, the hidden message may be in invisible ink between the visible lines of a private letter.

The advantage of steganography, over cryptography alone, is that messages do not attract attention to themselves. Plainly visible encrypted messagesóno matter how unbreakableówill arouse suspicion, and may in themselves be incriminating in countries where encryption is illegal. Therefore, whereas cryptography protects the contents of a message, steganography can be said to protect both messages and communicating parties.

Steganography includes the concealment of information within computer files. In digital steganography, electronic communications may include steganographic coding inside of a transport layer, such as a document file, image file, program or protocol. Media files are ideal for steganographic transmission because of their large size. As a simple example, a sender might start with an innocuous image file and adjust the color of every 100th pixel to correspond to a letter in the alphabet, a change so subtle that someone not specifically looking for it is unlikely to notice it.

The first recorded uses of steganography can be traced back to 440 BC when Herodotus mentions two examples of steganography in The Histories of Herodotus. Demaratus sent a warning about a forthcoming attack to Greece by writing it directly on the wooden backing of a wax tablet before applying its beeswax surface. Wax tablets were in common use then as reusable writing surfaces, sometimes used for shorthand. Another ancient example is that of Histiaeus, who shaved the head of his most trusted slave and tattooed a message on it. After his hair had grown the message was hidden. The purpose was to instigate a revolt against the Persians.

Steganography has been widely used, including in recent historical times and the present day. Possible permutations are endless and known examples include:
* Hidden messages within wax tablets: in ancient Greece, people wrote messages on the wood, then covered it with wax upon which an innocent covering message was written.
* Hidden messages on messenger's body: also used in ancient Greece. Herodotus tells the story of a message tattooed on a slave's shaved head, hidden by the growth of his hair, and exposed by shaving his head again. The message allegedly carried a warning to Greece about Persian invasion plans. This method has obvious drawbacks, such as delayed transmission while waiting for the slave's hair to grow, and the restrictions on the number and size of messages that can be encoded on one person's scalp.
* In WWII, the French Resistance sent some messages written on the backs of couriers using invisible ink.
* Hidden messages on paper written in secret inks, under other messages or on the blank parts of other messages.
* Messages written in Morse code on knitting yarn and then knitted into a piece of clothing worn by a courier.
* Messages written on the back of postage stamps.
* During and after World War II, espionage agents used photographically produced microdots to send information back and forth. Microdots were typically minute, approximately less than the size of the period produced by a typewriter. WWII microdots needed to be embedded in the paper and covered with an adhesive (such as collodion). This was reflective and thus detectable by viewing against glancing light. Alternative techniques included inserting microdots into slits cut into the edge of post cards.
* During World War II, a spy for Japan in New York City, Velvalee Dickinson, sent information to accommodation addresses in neutral South America. She was a dealer in dolls, and her letters discussed how many of this or that doll to ship. The stegotext was the doll orders, while the concealed "plaintext" was itself encoded and gave information about ship movements, etc. Her case became somewhat famous and she became known as the Doll Woman.
* Cold War counter-propaganda. In 1968, crew members of the USS Pueblo (AGER-2) intelligence ship held as prisoners by North Korea, communicated in sign language during staged photo opportunities, informing the United States they were not defectors but rather were being held captive by the North Koreans. In other photos presented to the US, crew members gave "the finger" to the unsuspecting North Koreans, in an attempt to discredit photos that showed them smiling and comfortable.

--
http://en.wikipedia.org/wiki/Steganography

谷歌翻译如下:

隐写术是一种以隐藏方式编写隐藏消息的艺术和科学,除了发送者和预期的接收者之外,没有人怀疑消息的存在,这是一种通过隐蔽的安全方式。隐写术一词起源于希腊语,意为“隐匿书写”,源于希腊语steganos的意思是“被遮盖或保护”,而graphein则是“写”。该术语的首次记录使用是在1499年,由约翰内斯·特里米缪斯(Johannes Trithemius)在他的《密写术》中作为密码术和密写术的专着伪装成一本魔术书。通常,消息看起来像是其他东西:图像,文章,购物清单或其他封面文字,通常,隐藏的消息可能在私人字母的可见行之间以不可见的墨水显示。

相对于仅使用密码学而言,隐秘术的优势在于消息不会引起人们的注意。清晰可见的加密消息至关重要,牢不可破-会引起怀疑,并且在加密非法的国家/地区可能会成为犯罪。因此,虽然密码术保护消息的内容,但是可以说隐秘术既保护消息又保护通信方。

隐写术包括计算机文件中信息的隐藏。在数字隐写术中,电子通信可以包括诸如文件文件,图像文件,程序或协议之类的传输层内部的隐写术编码。媒体文件由于尺寸大而非常适合进行隐秘传输。举一个简单的例子,发件人可能从一个无害的图像文件开始,并调整每第100个像素的颜色以对应于字母中的一个字母,这种变化是如此微妙,以至于没有专门寻找它的人不太可能注意到它。

隐写术的首次记录使用可追溯到公元前440年,当时希罗多德斯在《希罗多德的历史》中提到了隐写术的两个例子。Demaratus通过将其直接涂在蜡片的木制背衬上,然后涂上蜂蜡表面,向希腊发出了即将袭击的警告。蜡片通常用作可重复使用的书写表面,有时用作速记。另一个古老的例子是希斯蒂厄斯(Histiaeus),他剃了他最受信任的奴隶的头,并在上面刻了一条信息。他的头发长了以后,信息被隐藏了。目的是煽动对波斯人的反抗。

隐写术已被广泛使用,包括最近的历史时期和今天。可能的排列是无止境的,已知的示例包括:
*蜡片中的隐藏信息:在古希腊,人们在木头上写下信息,然后用蜡覆盖它,在上面写上了无辜的覆盖信息。
*在信使身上隐藏的信息:在古希腊也使用。希罗多德斯讲述了一个信息的故事,该信息在一个奴隶的剃光头上刺青,被头发的生长所掩盖,并再次被剃光头而暴露出来。据称该消息向希腊发出了有关波斯入侵计划的警告。这种方法有明显的缺点,例如在等待奴隶的头发长大时传输延迟,以及对可以在一个人的头皮上编码的消息的数量和大小的限制。
*在第二次世界大战中,法国抵抗军使用隐形墨水发送了一些信使在信使背面写的信息。
*隐藏在用秘密墨水写在纸上,其他消息下方或其他消息空白部分上的消息。
*用摩尔斯电码写的信息,用在针织纱上,然后编织成快递员穿的一件衣服。
*邮件写在邮票背面。
*在第二次世界大战期间和之后,间谍活动人员使用照相产生的微点来回发送信息。微点通常很小,大约小于打字机产生的周期的大小。第二次世界大战的微点需要嵌入纸中,并用粘合剂(例如胶棉)覆盖。这是反射性的,因此通过观察掠射光可以检测到。替代技术包括将微点插入到明信片边缘的狭缝中。
*第二次世界大战期间,在纽约市的日本间谍Velvalee Dickinson向南美洲中立的住所地址发送了信息。她是玩偶的经销商,她的来信中讨论了要运送多少个这种玩偶。隐身文字是洋娃娃的命令,而隐藏的“纯文字”本身是经过编码的,并提供了有关船只运动的信息,等等。她的案子有些出名,被称为“娃娃女人”。
*冷战反宣传。1968年,被朝鲜俘虏的普韦布洛(AGER-2)情报船的船员在上演拍照的机会中以手语进行了交流,告知美国他们不是叛逃者,而是被朝鲜人俘虏。在向美国展示的其他照片中,机组人员用手指“指”了毫无戒心的朝鲜人,以抹黑显示他们微笑和舒适的照片。

-
http://en.wikipedia.org/wiki/隐身术

第三步:搞不到了,有大佬提示一下吗?

待续…

flag{Base_sixty_four_point_five}

第十题:考察文件挂载

img

解题报告:

发现文件系统里面有一个疑似flag的信息:

img

挂载文件系统,查找flag文件,base64解码得到flag:

mount f1fc23f5c743425d9e0073887c846d23 /mnt/

img

第十一题:考察莫斯密码

img

解题报告:

第一步:在chrome浏览器的Console一顿操作:

img

得到如下信息:

NoFlagHere! NoFlagHere! NoFlagHere!
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Close - but still not here !
BABA BBB BA BBA ABA AB B AAB ABAA AB B AA BBB BA AAA BBAABB AABA ABAA AB BBA BBBAAA ABBBB BA AAAB ABBBB AAAAA ABBBB BAAA ABAA AAABB BB AAABB AAAAA AAAAA AAAAB BBA AAABB
Lorem ipsum dolor sit amet,  consectetur adipiscing elit.  Cras faucibus odio ut metus vulputate,  id laoreet magnavolutpat.  Integer nec enim vel arcu porttitor egestas.  
Vestibulum suscipit lorem sed sem faucibus rutrum.  Nunc diamorci,  convallis  vitae  auctor  vehicula,  interdum  ut  mi.   Maecenas  nec  urna  at  dolor  mattis  dictum  sit  amet  at  orci.
Mauris condimentum adipiscing erat nec feugiat.  Curabitur scelerisque varius ligula,  iaculis adipiscing dui.  Duis egetullamcorper arcu.  In facilisis et tortor commodo aliquam.  
Nulla feugiat, sem eu molestie bibendum, leo nisi porttitormassa, id accumsan sapien libero id tellus.  In enim lacus, sollicitudin a felis quis, blandit porta ipsum.  Donec sed nibhegestas, tristique mauris eu, rutrum justo.  
Nulla facilisi.  Duis gravida semper dui laoreet vulputate.  Aenean quis tempororci.   Cras  placerat  lectus  nulla,  eu  bibendum  metus  interdum  in.Lorem  ipsum  dolor  sit  amet,  consectetur  adipiscingelit.   
Cras  faucibus  odio  ut  metus  vulputate

第二步:这不就是嘀嗒嘀嗒,莫斯密码:

BABA BBB BA BBA ABA AB B AAB ABAA AB B AA BBB BA AAA BBAABB AABA ABAA AB BBA BBBAAA ABBBB BA AAAB ABBBB AAAAA ABBBB BAAA ABAA AAABB BB AAABB AAAAA AAAAA AAAAB BBA AAABB

一口气脚本,不求人:

dict1 = {'A': '.',
        'B': '-',
        ' ': '/'
        };

dict2 = {'.-': 'a',
        '-...': 'b',
        '-.-.': 'c',
        '-..':'d',
        '.':'e',
        '..-.':'f',
        '--.': 'g',
        '....': 'h',
        '..': 'i',
        '.---':'j',
        '-.-': 'k',
        '.-..': 'l',
        '--': 'm',
        '-.': 'n',
        '---': 'o',
        '.--.': 'p',
        '--.-': 'q',
        '.-.': 'r',
        '...': 's',
        '-': 't',
        '..-': 'u',
        '...-': 'v',
        '.--': 'w',
        '-..-': 'x',
        '-.--': 'y',
        '--..': 'z',
        '.----': '1',
        '..---': '2',
        '...--': '3',
        '....-': '4',
        '.....': '5',
        '-....': '6',
        '--...': '7',
        '---..': '8',
        '----.': '9',
        '-----': '0',
        '--..--': ',',
        '---...': ':',
        '/': ' '
        };


enc_str0="BABA BBB BA BBA ABA AB B AAB ABAA AB B AA BBB BA AAA BBAABB AABA ABAA AB BBA BBBAAA ABBBB BA AAAB ABBBB AAAAA ABBBB BAAA ABAA AAABB BB AAABB AAAAA AAAAA AAAAB BBA AAABB"
enc_str1=""
dec_str=""
for i in enc_str0:
  enc_str1+=dict1[i]
enc_str1=enc_str1.split("/")
print(enc_str1)
for i in enc_str1:
  dec_str += dict2[i]
print(dec_str)

img

第十二题:考察文件隐写

img

解题报告:

第一步:查看pacp包中的隐藏文件

binwalk acfff53ce3fa4e2bbe8654284dfc18e1.pcapng

img

第二步:分离出隐藏文件

foremost acfff53ce3fa4e2bbe8654284dfc18e1.pcapng

img

第三步:获得一个加密的ZIP文件

img

第四步:Wireshark流量分析

解压密码就藏在:6666.jpg

img

第五步:追踪HTTP流

从这开始:

img

到这结束:

img

第六步:新建hex文件[3]

img

拿到解码密码:Th1s_1s_p4sswd_!!!

img

第七步:拿着密码解压得到flag

img


关于黑客&网络安全学习指南

学好 网络安全不论是就业还是做副业赚钱都不错,但要学会 网络安全 还是要有一个学习规划。最后给大家分享一份全套的 网络安全学习资料,给那些想学习网络安全的小伙伴们一点帮助!

内容涵盖了网络安全法学习、网络安全运营等保测评、渗透测试基础、漏洞详解、计算机基础等教程,带你从零基础系统性的学好网络安全。

1.学习路线图
在这里插入图片描述

攻击和防守要学的东西也不少,具体要学的东西我都写在了上面的路线图,如果你能学完它们,你去就业和接私活完全没有问题。

2.网络安全视频教程600集和配套电子书
观看零基础学习视频,看视频学习是最快捷也是最有效果的方式,跟着视频中老师的思路,从基础到深入,还是很容易入门的。

在这里插入图片描述

温馨提示:篇幅有限,已打包文件夹,获取方式在:CSDN大礼包:《黑客&网络安全入门&进阶学习资源包》免费分享

3.技术文档
技术文档也是我自己整理的,包括我参加大型网安行动、CTF和挖SRC漏洞的经验和技术要点,电子书也有200多本,由于内容的敏感性,我就不一一展示了。
在这里插入图片描述

4.工具包、面试题和源码
“工欲善其事必先利其器”我为大家总结出了最受欢迎的几十款款黑客工具。涉及范围主要集中在 信息收集、Android黑客工具、自动化工具、网络钓鱼等,感兴趣的同学不容错过。
在这里插入图片描述

还有我视频里讲的案例源码和对应的工具包,需要的话也可以拿走。

因篇幅有限,仅展示部分资料,需要点击下方链接即可前往获取:CSDN大礼包:《黑客&网络安全入门&进阶学习资源包》免费分享

最后就是我这几年整理的网安方面的面试题,如果你是要找网安方面的工作,它们绝对能帮你大忙。

这些题目都是大家在面试深信服、奇安信、腾讯或者其它大厂面试时经常遇到的,如果大家有好的题目或者好的见解欢迎分享。

参考解析:深信服官网、奇安信官网、Freebuf、csdn等

内容特点:条理清晰,含图像化表示更加易懂。

内容概要:包括 内网、操作系统、协议、渗透测试、安服、漏洞、注入、XSS、CSRF、SSRF、文件上传、文件下载、文件包含、XXE、逻辑漏洞、工具、SQLmap、NMAP、BP、MSF…
在这里插入图片描述

因篇幅有限,仅展示部分资料,需要点击下方链接即可前往获取:CSDN大礼包:《黑客&网络安全入门&进阶学习资源包》免费分享

  • 22
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
回答: 对于攻防世界pwn新手,其中一个关键是要修改全局变量pwnme的内容。通过格式化字符串的方法,可以实现这个目标。格式化字符串的原理是利用输入的格式化字符串,修改内存中的指定位置的值。具体的方法可以参考CTF-wiki上对格式化字符串的总结。另外,还可以利用栈溢出漏洞来实现攻击。栈溢出漏洞的原理是当输入的数据超过了栈的缓冲区大小时,会覆盖到相邻的内存区域,包括函数返回地址等重要信息。通过溢出覆盖system函数的参数为"/bin/sh",就可以获取到shell权限。在IDA32中,可以通过查看字符串窗口,找到可以直接利用的字符串,比如system和/bin/sh。这样就可以猜测需要溢出覆盖system函数的参数,实现获取shell的目的。123 #### 引用[.reference_title] - *1* *2* [xctf攻防世界pwn基础解(新手食用)](https://blog.csdn.net/lplp9822/article/details/89735167)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item] - *3* [攻防世界 pwn 二进制漏洞简单练习区 答(1-10解)](https://blog.csdn.net/qq_33957603/article/details/122450397)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item] [ .reference_list ]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值