Skip to content

Add files via upload #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/guide/2024/week1.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Level 6 有什么用,还不是被神之右手所打败

### 谢谢皮蛋

<Container type='info'>
<Container type='tip'>

本题所需要的前期知识储备较多,如果你从未了解和接触过数据库和 SQL 语句,你可能需要花费一定的时间快速了解并尝试。

Expand Down
8 changes: 4 additions & 4 deletions docs/guide/2024/week2.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Text from '@/components/docs/NonTextDetectable.vue'

### ez_game

<Container type='tip'>
<Container type='info'>

本题考查的是 ret2libc 的知识点。
</Container>
Expand All @@ -40,7 +40,7 @@ import Text from '@/components/docs/NonTextDetectable.vue'

### Bad Asm

<Container type='tip'>
<Container type='info'>

本题考查 shellcode 编写能力。
</Container>
Expand Down Expand Up @@ -77,7 +77,7 @@ import Text from '@/components/docs/NonTextDetectable.vue'

### Ptrace

<Container type='tip'>
<Container type='info'>

本题考查对于调试器原理的理解,侧重对 ptrace 的了解。
</Container>
Expand All @@ -100,7 +100,7 @@ import Text from '@/components/docs/NonTextDetectable.vue'

### 复读机

<Container type='tip'>
<Container type='info'>

本题考查 Python 中 Flask 框架中,`render_template` 等函数导致的模板渲染注入(SSTI)的利用。
</Container>
Expand Down
16 changes: 8 additions & 8 deletions docs/guide/2024/week3.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Container from '@/components/docs/Container.vue'

# Week 3

从本周开始,题目将逐渐增加难度,并注重知识点的考察,希望大家好好学习相关内容。若仍有相关问题,请参考[快速入门](/learn/)。
从本周开始,题目将逐渐增加难度,并注重知识点的考查,希望大家好好学习相关内容。若仍有相关问题,请参考[快速入门](/learn/)。

## Pwn

Expand Down Expand Up @@ -63,7 +63,7 @@ ollvm 混淆需要使用 d810 去除,但可能还面临着部分控制流难

### 臭皮的计算机

<Container type='tip'>
<Container type='info'>

本题考查 Python 的命令执行和输入过滤绕过。
</Container>
Expand All @@ -72,7 +72,7 @@ ollvm 混淆需要使用 d810 去除,但可能还面临着部分控制流难

### 臭皮踩踩背

<Container type='tip'>
<Container type='info'>

本题考查对 Python 中「一切皆对象」的理解。
</Container>
Expand All @@ -90,9 +90,9 @@ ollvm 混淆需要使用 d810 去除,但可能还面临着部分控制流难

### 这照片是你吗

<Container type='tip'>
<Container type='info'>

本题考查常见的漏洞路径穿越漏洞,并且考查 Python 的代码审计。
本题考查常见的漏洞——路径穿越漏洞,并且考查 Python 的代码审计。
</Container>

解题需要:
Expand All @@ -107,7 +107,7 @@ ollvm 混淆需要使用 d810 去除,但可能还面临着部分控制流难

### blindsql1

与前几周的题一样,考察 SQL 注入的相关知识。可继续参考文章:[SQL 注入绕过过滤总结](https://yang1k.github.io/post/sql%E6%B3%A8%E5%85%A5%E7%BB%95%E8%BF%87%E5%8E%9F%E7%90%86%E6%80%BB%E7%BB%93/)。
与前几周的题一样,考查 SQL 注入的相关知识。可继续参考文章:[SQL 注入绕过过滤总结](https://yang1k.github.io/post/sql%E6%B3%A8%E5%85%A5%E7%BB%95%E8%BF%87%E5%8E%9F%E7%90%86%E6%80%BB%E7%BB%93/)。

## Crypto

Expand All @@ -119,13 +119,13 @@ ollvm 混淆需要使用 d810 去除,但可能还面临着部分控制流难

### ez_jail

Misc 有一大考点,就是考察各种边边角角的奇技淫巧,本题就考察了 C++ 的一些知识,还算是一道比较有开放性的题目,解法并不唯一。在以下网站你有可能找到可以完成这道题的奇技淫巧:
Misc 有一大考点,就是考查各种边边角角的奇技淫巧,本题就考查了 C++ 的一些知识,还算是一道比较有开放性的题目,解法并不唯一。在以下网站你有可能找到可以完成这道题的奇技淫巧:

- 知乎
- StackOverflow
- Github

<Container type='info'>
<Container type='tip'>

其实只有 src 内的 `server.py` 是主要代码,其余大部分都是与 Docker 镜像构建有关。感兴趣的同学也可以借此机会学习一下如何在本地构建 Docker 镜像然后运行。
</Container>
142 changes: 142 additions & 0 deletions docs/guide/2024/week4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
---
titleTemplate: ':title | 参考文档 - NewStar CTF 2024'
---
<script setup>
import Container from '@/components/docs/Container.vue'
</script>

# Week 4

本周题目难度已经很大了,希望大家不要焦躁,好好学习考查内容。

## Web

### ezcmsss

<Container type='info'>

本题考查的是对于 CMS 站点的测试利用。
</Container>

针对一些站点,一般通过收集该站点所采用的框架及其版本,通过一些[在线漏洞平台](https://avd.aliyun.com/)搜索历史漏洞并完成利用。

遇到没思路的题,可以先找几个常见的路径测试一下,如 `/robots.txt` `/upload` 等,或者看看有没有源码泄露。

### 臭皮踩踩背

<Container type='info'>

本题在 JavaScript 原型链污染漏洞的基础上考查了一个 RCE 技巧。
</Container>

关于原型链污染漏洞,可以参考下面两篇文章:

- [JavaScript 原型链污染](https://www.yuque.com/cnily03/tech/js-prototype-pollution)
- [深入理解 JavaScript Prototype 污染攻击](https://www.leavesongs.com/PENETRATION/javascript-prototype-pollution-attack.html)

在了解原型链污染漏洞后,如果你想不到需要污染的变量,这里有一份可能对解题有帮助的[官方文档](https://nodejs.cn/api/cli/node_options_options.html)。

::: tip
建议想要深入学习 Web 的选手准备一台具有公网 IP 的云服务器用于反弹 Shell,以方便 RCE.
:::

### chocolate

<Container type='info'>

本题考查了对 PHP 代码的基础审计和反序列化的利用示范, 很多地方可能并不需要很强的脚本编写能力就能在网上找到参考脚本, 但是希望你能把别人的方法转换为自己的思考, 这将有利于你未来的学习
</Container>

同时本题看似是「套娃」,实则一点都不难,也希望坚持到 Week 4 的师傅们能从中体会到一些上升的乐趣。

### blindsql2

遇到要自己手写注入脚本的题,为了防止出错,可以分多步完成。

1. 写一个 SQL 语句,能够查出所有的表名,并且合在一行

```sql
(select(group_concat(table_name))from(infOrmation_schema.tables)where((table_schema)like(database())))
```

2. 写一个 SQL 语句,返回一个字符串的第 i 个字符 `(select substr(%s,i,1))`,其中 `%s` 替换为你需要的字符串,比如和上面写出来的表名合在一起:

```sql
(select substr(
(Select(group_concat(table_name))from(infOrmation_schema.tables)where((table_schema)like(database()))),
i,1
))
```

3. 写一个 SQL 语句,判断一个字符的 ASCII 值是否等于某个值:`select (ascii ( %c ) =%d )`

4. 假如某个值是 1 的时候,程序延时 1 秒:`select (if ( %s , sleep(1) , 0 ))`

以上 4 个合在一起,就变成了:

当表名字符串的第 i 个字符的 ASCII 值等于 %d 的时候,程序延时 1 秒

```sql
if ((ascii(
substr(
(Select(group_concat(table_name))from(infOrmation_schema.tables)where((table_schema)like(database()))),
i,1)
)=%d),sleep(1),0)
```

希望选手编写脚本,以避免每次尝试都需要进行上述繁琐的过程。

### 隐藏的密码

出题思路主要来源于两篇文章:

- [Spring Boot Fat Jar 写文件漏洞到稳定 RCE 的探索](https://forum.butian.net/share/99)
- [最全 Spring Boot 相关漏洞学习汇总](https://forum.butian.net/share/103)

作为给新生入门的 Java 题,由于要降低难度,没有设置 SpringBoot 的 RCE 解法,但是思路其实都是 SpringBoot 在不解析 JSP 的情况下,如何进行 RCE 的问题,如果不从 SpringBoot 本身出发,就从系统层面出发,这里没有限制利用的方式,计划任务和系统命令劫持均可。

### PangBai 过家家(4)

<Container type='info'>

本题主要考查 GoLang 中 SSTI 的利用,并考查了 SSRF(服务端请求伪造)的常见技巧。
</Container>

题目给出了源码,并自带 Hint 文件。选手需要阅读并理解 main.go 中的不同路由的逻辑。

对于 `curl` 命令,选手可以自行了解 `curl` 所支持的协议,不止 HTTP、FTP、File 等协议。本题不需要出网。

完整的利用链步骤可能较多,希望选手能够自己写一个脚本完成自动化过程。例如,只需要修改脚本中的一个文件地址的字符串,就能完成对这个文件的任意文件读利用。

::: tip
推荐选手通过源码自行开启 Docker 环境,并先在本地打通题目。
:::

## Reverse

### MazE

推荐一篇有关 Linux 下 pipe 通信的文章:[Linux下进程间通信方式—— pipe(管道)](https://www.cnblogs.com/wuyepeng/p/9747557.html).

如果你已经找到了迷宫地图,但是苦于迷宫过大,那可以去学习一下[搜索算法](https://blog.csdn.net/qq_40258761/article/details/88678093)。

### easygui

关于 Windows 消息循环 的一篇文章:[深入理解 Windows 消息机制](https://blog.csdn.net/liulianglin/article/details/14449577)

## Crypto

### 俱以我之名

<Container type='quote'>

编辑者并不知道出题人想表达什么,出题人只留下了下面的内容。

`[我是谁?]`
</Container>

## Misc

### CRC

本题考查了对 PNG 格式文件的识别和修复,对一些常见文件二进制特征敏感,会在某些时候发挥关键作用(比如在流量分析中看到 JPG 文件头等)
2 changes: 1 addition & 1 deletion docs/wp/2024/week2/reverse/dirty-flowers.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ titleTemplate: ':title | WriteUp - NewStar CTF 2024'

# Dirty_flowers

考察内容是花指令,但是事实上新生在 week2 就学过汇编还是不敢奢望,因此实际考察内容是学习怎么用 `nop` 改汇编指令。
考查内容是花指令,但是事实上新生在 week2 就学过汇编还是不敢奢望,因此实际考查内容是学习怎么用 `nop` 改汇编指令。

按下 <kbd>⇧ Shift</kbd><kbd>F12</kbd> 查找字符串就可以发现提示。

Expand Down
2 changes: 1 addition & 1 deletion docs/wp/2024/week2/web/pidan-plus.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ titleTemplate: ':title | WriteUp - NewStar CTF 2024'

# 谢谢皮蛋 plus

同样还是联合注入,意在考察空格和 `and` 的绕过,为了避免直接使用报错注入得到 flag,将报错注入 ban 了
同样还是联合注入,意在考查空格和 `and` 的绕过,为了避免直接使用报错注入得到 flag,将报错注入 ban 了

```php
preg_match_all("/ |extractvalue|updataxml|and/i",$id)
Expand Down
2 changes: 2 additions & 0 deletions theme-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ sidebar:
link: /guide/2024/week2
- text: Week 3
link: /guide/2024/week3
- text: Week 4
link: /guide/2024/week4

'/wp/2024/':
- text: Week 1
Expand Down