picoCTF,General Skills,基本技能类,34/34

题目站点链接 https://play.picoctf.org/

最初将所有题解放在一个帖子里,帖子太长了不便于阅读,
为了方便后期编辑和阅读。2023年02月10日,将帖子拆分,按照题目类型分为六类:

picoCTF-General Skills,基本技能类
picoCTF-Cryptography,密码类
picoCTF-Forensics,取证类
picoCTF-Web Exploitation,网页开发类
picoCTF-Reverse Engineering,逆向类
picoCTF-Binary Exploitation,二进制类

下面,给出题解,逐步完善中……
注意:很多题目flag是变化的,每一个账号解题得到的flag不一样,所以,下面帖子里的flag仅供参考,但解题思路方法是一样的。



2019 picoCTF

01、2Warm,50分

十进制转二进制
picoCTF{101010}

02、Lets Warm Up,50分

16进制0x70,二进制122,ascii是p。

一开始以为是password,或者p开头的字。
试了很久,原来,就一个字。

picoCTF{p}

03、Warmed Up,50分

0x3D转十进制 picoCTF{61}

04、Bases,100分

用CyberChef_编码,自动解出base64
picoCTF{l3arn_th3_r0p35}

05、First Grep,100分

下载文件搜索pico字样,用grep ‘pico’ file
picoCTF{grep_is_good_to_find_things_f77e0797}

06、strings it,100分

下载一个文件,用strings 命令,把他输出到txt,在用grep搜索txt就找到了

07、what’s a net cat?,100分

用nc连接上就行了

picoCTF{nEtCat_Mast3ry_d0c64587}

08、Based,200分

就是进制转换,但是必须要快,写代码,查网站,必须45秒内,我试着写了一个代码,效果不错

# pip3, pwn
from tokenize import String

from pwn import *

r = remote('jupiter.challenges.picoctf.org', 15130)


def get_re_txt(r_text):
    n_start = r_text.find('Please give the')
    if n_start == -1:
        n_start = r_text.find('Please give me the')
        n_start = n_start + 19
    else:
        n_start = n_start + 16

    n_end = r_text.find('as a word') - 1
    r_text = r_text[n_start:n_end].strip()
    return r_text


def txt_to_word(r_text):
    r_arr = r_text.split(' ')
    word = ''
    dit = 2
    if r_arr[0].isdigit():
        if len(r_arr[0]) == 8:
            dit = 2
        elif len(r_arr[0]) == 3:
            dit = 8
    else:
        dit = 16

    for txt in r_arr:
        if dit == 16:
            word = word + unhex(txt).decode()
        else:
            word = word + chr(int(txt, dit))
    return word


while True:
    re_text = r.recv().decode()
    if re_text.find('picoCTF') > -1:
        print(re_text)
        break
    re_text = get_re_txt(re_text)
    print('[' + re_text + ']')
    trans_word = txt_to_word(re_text)
    print(trans_word)
    r.sendline(trans_word.encode())
r.interactive()
r.close()

picoCTF{learning_about_converting_values_02167de8}

09、plumbing,200分

jupiter.challenges.picoctf.org 14291,这个很简单,真搞不懂,竟然200分,用nc打开站点,输出到一个文件,比如:f.txt。
然后用grep pico f.txt 查找,就找到了

picoCTF{digital_plumb3r_ea8bfec7}

10、flag_shop,200分

这是一个flag商店,买1号1. Defintely not the flag Flag,写一个大数字,程序就会溢出,

if(total_cost <= account_balance){
       account_balance = account_balance - total_cost;
       printf("\nYour current balance after transaction: %d\n\n", account_balance);
                    }

然后再买2、1337号flag。就可以了

picoCTF{m0n3y_bag5_68d16363}

11、mus1c,300分

有点意思,这是一个歌词,然后找这个歌词的出处,网上说是在推特上找到了,我的推特打不开,
这个账号介绍了一个网站https://codewithrockstar.com/online,可以将歌词转码,然后就有了一些数字,用CyberChef解码就可以了。
picoCTF{rrrocknrn0113r}

12、1_wanna_b3_a_r0ck5tar

把程序唱成歌,这个要对英语敏感,有谐音语意什么的,我是查资料的

Rocknroll is right                  | Rocknroll = true
Silence is wrong                    | Silence = 5
A guitar is a six-string            | a_guitar = 19
Tommy's been down                   | Tommy = 44
Music is a billboard-burning razzma | Music = 160
Listen to the music                 | the_music = input()
If the music is a guitar            | if the_music == a_guitar:
Say "Keep on rocking!"              |     print("Keep on rocking!")
Listen to the rhythm                |     the_rhythm = input()
If the rhythm without Music is noth |     if the_rhythm - Music == False:
Tommy is rockin guitar              |         Tommy = 66
Shout Tommy!                        |         print(Tommy!)
Music is amazing sensation          |         Music = 79
Jamming is awesome presence         |         Jamming = 78
Scream Music!                       |         print(Music!)
Scream Jamming!                     |         print(Jamming!)
Tommy is playing rock               |         Tommy = 74
Scream Tommy!                       |         print(Tommy!)
They are dazzled audiences          |         They are dazzled audiences
Shout it!                           |         print(it!)
Rock is electric heaven             |         Rock = 86
Scream it!                          |         print(it!)
Tommy is jukebox god                |         Tommy = 73
Say it!                             |         print(it!)
Break it down                       |         break
Shout "Bring on the rock!"          |         print("Bring on the rock!")
Else Whisper "That ain't it, Chief" |         Else print("That ain't it,
Break it down                       |         break

最后,

n = [66, 79, 78, 74, 79, 86, 73]
print(''.join(map(chr, n)))

picoCTF{BONJOVI}

BON JOVI 邦 乔维 是一个摇滚明星,我听过他的歌……

2019 picoGym Exclusive

01、Big Zip,100分

grep -r “pico”

picoCTF{gr3p_15_m4g1c_ef8790dc}

02、First Find,100分

用grep -rnR picoCTF files搜索
picoCTF{f1nd_15_f457_ab443fd1}

2021 picoCTF

01、Obedient Cat,5分

这题很简单,下载文件,用记事本打开就行了。

picoCTF{s4n1ty_v3r1f13d_b5aeb3dd}

02、Python Wrangling,10分

下载得到一个py程序,把这个python程序运行起来就行了。要把flag.txt.en文件放在第一个参数里,输入密码,密码在pw.txt里
然后用-d参数解码,就有了。

picoCTF{4p0110_1n_7h3_h0us3_aa821c16}

03、Wave a flag,10分

下载后,用二进制编辑打开,就找到了flag了。
运行这个文件,按提示,加-h也能获得flag。
二进制编辑,推荐010editor,010editor,官方网站: https://www.sweetscape.com/010editor/

picoCTF{b1scu1ts_4nd_gr4vy_755f3544}

04、Nice netcat…,15分

打开webshell,输入给定的字串,得到一个很长的数字列,一看就是ASCII码。
把数字列放到数组里。写一个Python小程序

nArr = [112, 105, 99, 111, 67, 84, 70, 123, 103, 48, 48, 100, 95, 107, 49, 116, 116, 121, 33, 95, 110, 49, 99, 51, 95, 107, 49, 116, 116, 121, 33, 95, 55, 99, 48, 56, 50, 49, 102, 53, 125, 10]
s = ''
for iNum in nArr:
    s = s + (chr(iNum))
print(s)

picoCTF{g00d_k1tty!_n1c3_k1tty!_7c0821f5}

05、Static ain’t always noise,20分

下载得到一个文件static,用二进制打开,找到了flag,用cat命令看也能找到
二进制编辑,推荐010editor https://www.sweetscape.com/010editor/

picoCTF{d15a5m_t34s3r_1e6a7731}

06、Tab, Tab, Attack,20分

下载得到一个ZIP,解压后,有很多文件夹,最后有一个文件,用二进制打开,找到flag

picoCTF{l3v3l_up!_t4k3_4_r35t!_524e3dc4}

07、Magikarp Ground Mission,30分

登录SSH,用ls、cat命令找到三个文件,合并在一起就可以了
ssh登录系统
我习惯用SecureCRT登录ssh。
SecureCRT官方网站:https://www.vandyke.com/products/securecrt/
官方提供试用版,破解有点麻烦,大家自己找资源。

picoCTF{xxsh_0ut_0f_\/\/4t3r_5190b070}

2022 Beginner

01、Codebook,100分

下载一个code程序和codebook,运行一下就行了

picoCTF{c0d3b00k_455157_197a982c}

02、convertme.py,100分

下载文件运行,他给了一个数字,转换成二进制,回答给程序,程序就给出flag

picoCTF{4ll_y0ur_b4535_9c3b7d4d}

03、fixme1.py,100分

下载文件运行,就行了,最后的print前面多了两个空格
picoCTF{1nd3nt1ty_cr1515_182342f7}

04、fixme2.py,100分

下载文件运行,就行了 if语句 = 应该是 == (两个等于号)
picoCTF{3qu4l1ty_n0t_4551gnm3nt_e8814d03}

05、Glitch Cat,100分

nc saturn.picoctf.net 51109链接,得到下面的

'picoCTF{gl17ch_m3_n07_' + chr(0x62) + chr(0x64) + chr(0x61) + chr(0x36) + chr(0x38) + chr(0x66) + chr(0x37) + chr(0x35) + '}'

在python运行就行了

picoCTF{gl17ch_m3_n07_bda68f75}

06、HashingJobApp,100分

nc saturn.picoctf.net 57689
链接后计算3个MD5字符串就可以了,操作快一点儿,用CyberChef解码
也可以写pwn代码来解题。

picoCTF{4ppl1c4710n_r3c31v3d_3eb82b73}

07、PW Crack 1,100分

下载一个程序,分析一下输入1e1a,就把level1.flag.txt.enc文件解密
picoCTF{545h_r1ng1ng_fa343060}

08、PW Crack 2,100分

下载一个程序,分析一下输入
chr(0x33) + chr(0x39) + chr(0x63) + chr(0x65),转化一下是
39ce,就把level2.flag.txt.enc文件解密

picoCTF{tr45h_51ng1ng_502ec42e}

09、PW Crack 3,100分

代码里有这样一行

# The strings below are 7 possibilities for the correct password.
#  (Only 1 is correct)
pos_pw_list = ["6997", "3ac8", "f0ac", "4b17", "ec27", "4e66", "865e"]

试到4b17的时候,可以了

picoCTF{m45h_fl1ng1ng_2b072a90}

10、PW Crack 4,100分

程序代码改一下,加一个循环,

for pstxt in pos_pw_list:
    level_4_pw_check(pstxt)

这样就测出来了
picoCTF{fl45h_5pr1ng1ng_cf341ff1}

11、PW Crack 5,100分

题目给了个字典,改造一下程序

f = open('dictionary.txt', 'r', encoding='utf-8')
lines = f.readlines()
for pstxt in lines:
    level_5_pw_check(pstxt.strip())

控制一下判断停止循环,这样就测出来了

picoCTF{h45h_sl1ng1ng_40f26f81}

12、runme.py,100分

运行一下程序就有了

picoCTF{run_s4n1ty_run}

13、Serpentine,100分

分析代码,程序很长,最重要的是这一段

        elif choice == 'b':
            print('\nOops! I must have misplaced the print_flag function! Check my source code!\n\n')

print_flag函数已经有了,改一下

        elif choice == 'b':
            print_flag()

运行程序就行了
在这里插入图片描述
picoCTF{7h3_r04d_l355_7r4v3l3d_ae0b80bd}

2023 picoCTF

01、chrono,100分

先用SSH连接,一般的工具还连不上,用kali的SSH命令连上了

                                                                                                                            
┌──(root㉿xli)-[~]
└─# ssh -p 55034 picoplayer@saturn.picoctf.net
picoplayer@saturn.picoctf.net's password: 
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.15.0-1031-aws x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, you can run the 'unminimize' command.
Last login: Sun Apr 30 04:30:08 2023 from 112.32.33.32

ssh -p 55034 picoplayer@saturn.picoctf.net

  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值