PolarD&N靶场

Misc

1、0和255
首先给出了两个文件image_list.txt和image_list.py
python文件代码

from PIL import Image
image = Image.open('flag.png')   #flag.png分辨率为33*33
width = image.width
height = image.height
image_list = []
for x in range(height):
    scanline_list = []
    for y in range(width):
        pixel = image.getpixel((y, x))
        scanline_list.append(pixel)
    image_list.append(scanline_list)
print(image_list)

它将一个flag图片按像素读取,范围0-255,生成列表,即image_list.txt。
exp很简单,就将list中的值按像素点填回去,得到png文件,点击得到二维码
output
扫描二维码得到Polar_Night
根据题目要求再将其进行md5加密(有大写和小写两种),套上flag测试
2、01
与第一题类似,给出了一个flag.zip但是加密了,要密码,在hint提示中给出了25*25的01矩阵,想到把1看做0,把0看做255(这个想法是试用了1看做255,0看做0后失败了,所以反过来试一试),套用上一题的exp代码,得到二维码图片
output
扫描得到p@ssw0rd!
输入得到一个txt文件,里面是喵言喵语,第一感觉是西电2023招新赛的喵言喵语,但是发现不止2种形式,所以试一试兽语加密解密,得到flag
3、100RGB
题目内容由一行行Emoji表情 组成。
Emoji解密得到:

82,71,66102,108,97103,123,65110,49,10997,49,11532,95,97114,51,9599,117,43101,125,0

根据ASCII码可得到真实的ASCII码。

82 71 66 102 108 97 103 123 65 110 49 109 97 49 115 32 95 97 114 51 95 99 117 43 101 125

把RGB去掉,得到flag
4. 二维码
下载拿到png文件,不能打开,用010打开得到了
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXkAAAF4CAYAAACxX4mYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAACsWSURBVHhe7Z1fiKZl/f91p3DRptVxddewo2JMomBRFpGEUVkSrdNioViFoCPrYIkinIohpHCDOhAhPZgQRk2S6KA/A7V0ZBs2HajUIKK1lIOU1WZN2rj39/d5eObHNn6e67o+13N97vu67+f1htdRz319rr8vn2fivvaihhBCyODy+uuvN3/5y18aJE8IIQPMP/7xj+aVV15B8oQQMsT87W9/a86ePYvkCSFkiHnttdea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Ui+fJA8REHy5UHyepB8+SB5iILky4Pk9SD58hmU5OXVWtlMUJaVlZXxDIdz5swZ9fkYlleivWu0tYdS59QSOThyEZhWr2u895AVmSeZL4/k7iEZu0faOJfWZEueEEJI/UHyhBAy4CB5QggZcJA8IYQMOEieEEIGHCRPCCEDDpInhJABB8kTQsiAg+QJIWTAQfKEEDLgIHlCCBlw/r/kX3jhhea5555rnnnmmeZXv/pV8/TTTwMAQA8Rh4vLxeni9rNnzzYX/e53vxtdrvOLX/yi+dnPftb89Kc/BQCAHiIOF5eL08Xtf/7zn5uLXn755eb5559vNjY2ml//+tej/xEAAPqHOFxcLk4Xt7/66qvN/wHrIhz8YSu7CgAAAABJRU5ErkJggg==
以上形式,其中我把等号后面的垃圾数据去除了(看着就没用),然后一看就是base64编码,搜索base64转图片,得到二维码,扫一扫得到flag

PWN

1、 sandbox
检查文件

pwn checksec sandbox

题目为64位elf文件,开启NX和Canary保护。
将文件导入ida中,发现box()函数

__int64 box()
{
  char buf[40]; // [rsp+0h] [rbp-30h] BYREF
  unsigned __int64 v2; // [rsp+28h] [rbp-8h]

  v2 = __readfsqword(0x28u);
  puts("Please input your command");
  puts("No sh,no cat,no flag.");
  system("ls");
  read(0, buf, 0x20uLL);
  if ( strchr(buf, 115) || strchr(buf, 104) || strstr(buf, "cat") || strstr(buf, "flag") || strchr(buf, 45) )
  {
    puts("Illegal command.");
    exit(0);
  }
  system(buf);
  return 0LL;
}

box() 函数中有一个read() 函数,可以读取0x20 个字节数据到buf ,这里分析出需要用户输入数据。

if语句中strchr() 函数对用户的输入进行了检查,不允许字符s、h、cat、flag、- 输入。

box() 函数最后执行system() 函数,需要绕过sh、cat flag 等命令获取终端执行权限。
利用system("$0") 获取终端执行权限;输入$0 传给程序拿到权限;(system($0) 是在一个编程语言中调用系统命令的方式)