티스토리 뷰

writeup/LOS

[Lord of SQL injection] cyclops

hoppi 2021. 8. 24. 15:05

68번째 글.

 

 

1. 코드 분석

지금부터 올라오는 문제들은 다 modsecurity(WAF)가 걸려있다.

WAF가 걸려있어도 쉽게 우회하여 풀 수 있는 문제들은 writeup을 따로 올리지 않았다.

union select를 사용하라고 나와있다.

 

 

2. Exploit

id=\&pw= union select 'first', 'second'%23(안 댐)

위처럼 계속해서 쓰던 방법으로 백 슬래시를 이용하여 우회하는 방법이 먹히지 않았다.

 

 

https://github.com/SpiderLabs/owasp-modsecurity-crs/issues/1181

 

Bypass the latest CRS v3.1.0 rules of SQL injection · Issue #1181 · SpiderLabs/owasp-modsecurity-crs

Type of Issue False Negative Description Per #1167, I wanna raise more FNs in this thread. Before getting into other FNs, I want to give out more information to #1167 so as to help the maintainers ...

github.com

 

결국 3.1 버전에서 이용할 수 있는 우회 기법을 통해서 풀 수 있었다.

 

 

id='<@=1 union/**/select 'first','second'%23

union과 select사이에 주석처리를 해줘야 WAF에 걸리지 않았다.

 

 

 

'writeup > LOS' 카테고리의 다른 글

[Lord of SQL injection] zombie  (0) 2021.08.20
[Lord of SQL injection] ouroboros  (0) 2021.08.18
[Lord of SQL injection] phantom  (0) 2021.08.16
[Lord of SQL injection] frankenstein  (0) 2021.08.15
[Lord of SQL injection] blue_dragon  (0) 2021.08.09