짱짱해커분들 힌트좀 부탁드립니다.

docs랑 함수 코드를 보면서 공격 방향을 찾는 중입니다.ㅠㅠ
현재 시도해본건 아래와 같습니다.

기본적인 sql query 동작 여부 확인
로컬 또는 외부 파일 읽기 및 저장
require 구문으로 외부 js로드
외부 sql파일 로드

로컬에서 테스트도 해보고 이것저것 해봤지만, 도저히 /flag 파일을 "실행"할 방법을 못찾겠습니다.
가장 유력한건 require 구문인데, 테스트 해본 결과 nodejs 코드로 인식하지 않고 단순 프론트 엔드 js로 인식하는거 같습니다.
(alasql-echo.js는 require하면 왜 동작을 하는건지...)

#web
작성자 정보
답변 1
avatar
juno2
답변 등록: 25
About AlaSQL
AlaSQL applies SQL opperations to JavaScript arrays and objects therefore the library can best be described as a JavaScript SQL database.

The API is designed for:

JavaScript data manipulation plus advanced filtering, grouping and joining
Client-side SQL database with option for persistency (as Local Storage and Indexed DB)
Fast data processing for BI and ERP applications on fat clients
Easy ETL (extract, transfer, and loading) data to/from CSV and XLSX + others
Works in all major browsers, Node.js, and mobile applications

http://host1.dreamhack.games:8577/?select%2520asdf(2)

/flag파일을 실행하기 전 서버에서 javascript를 실행하는 방향으로 접근하시는건 어떨까요.

2020.09.10. 10:44
질문에 대한 답을 알고 계신가요?
지식을 나누고 포인트를 획득해보세요.
답변하고 포인트 받기