![[웹해킹] SQL INJECTION 공격 종류 (In band / blind / out of band )](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FcKxXPb%2FbtsMBUZVG8t%2FAAAAAAAAAAAAAAAAAAAAANqaNvjWYWICKJhEnom-woxDl0OKL48LFK7ZdP6UgE2Y%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3D6ynsduYRZzSzxqJJjmDDFucvUp4%253D)
● SQL INJECTION 공격 종류 ○ IN-BAND SQL INJECTION 가장 일반적인 SQL injection으로 같은 통신 채널을 사용하여 공격 코드를 주입하고 결과를 수집할 수 있을때 수행하는 공격 - Error based SQL injection : 쿼리를 조작하여 에러를 발생시키고 에러 메세지를 분석하여 정보를 수집하는 공격 - Union based SQL injection : 두개 이상의 SELECT 구문을 사용해 연접하여 추가정보를 포함하도록 하는 공격 ○ BLIND SQL INJECTION 인벤드 SQL 인젝션과 달리 직접적인 결과 수집이 어려울 경우 사용하는 공격 기법 - Bolean based SQL injection :..
![[DREAMHACK 워게임] 웹해킹_simple_sqli 문제풀이](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FbUF4n1%2FbtsAM4gl6oj%2FAAAAAAAAAAAAAAAAAAAAAGDhqQYb3kpgr7DY7tL9JjPEsznzqf9Eui-b9IhMXujP%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3DtO%252Bsli65jUejxD6KUz1urRJ4dx8%253D)
해당문제는 sql injection 유형이다.@app.route('/login', methods=['GET', 'POST'])def login(): if request.method == 'GET': return render_template('login.html') else: userid = request.form.get('userid') userpassword = request.form.get('userpassword') res = query_db(f'select * from users where userid="{userid}" and userpassword="{userpassword}"') if res: use..