본문 바로가기

suninatas 27 / system

2020. 12. 21. 11:58

27번 문제에요.

배점은 500점, 분야는 시스템이래요.

왜?

 

암튼 IRC서버에서 뭔가 암호문을 빼냈다네요.

다운로드 받아보면

 

그냥 평범한 글이에요.

이게 왜 시스템????

 

근데 제목이 x86으로 읽을수 있냐고 물어보네요.

온갖 삽질을 다 해봤고 결국 힌트를 봤어요.

저기에 사실 어셈블리 명령어가 숨겨져있고 실행시키면 키가 튀어나오는거래요.

 

그렇다고 하니

올리를 켜서

 

헥스덤프를 딴다음

 

붙여넣고 잴 밑에 브레이크포인트를 설정하고

 

실행을 시켜보면

 

스택의 ascii 덤프에 키가 있어요.

key_is_accbggj

 

이래서 시스템이구나

암튼

 

빠밤!

 

키가 나왔네요.

'연구글 > suninatas.com' 카테고리의 다른 글

suninatas 28 / forensics  (0) 2021.03.06
suninatas 26 / forensics  (0) 2020.12.17
suninatas 25 / system  (0) 2020.12.16
suninatas 24 / system  (0) 2020.12.09
suninatas 23 / web  (0) 2020.12.07
댓글

suninatas 26 / forensics

2020. 12. 17. 18:01

26번 문제에요.

배점은 200점, 분야는 포렌식이래요.

 

Cipher III : Frequency analysis

This challenge is to recover the plaintext from the following ciphertext using frequency analysis:

/*중략*/

Note that we have omitted the blank letters and punctuation marks of the plaintext.

 

대충 빈도수 분석으로 암호문을 풀라는거네요.

 

그걸 그대로 자동화 사이트에 집어넣어보면

 

놀랍게도 바로 풀려요.

 

김연아에 대한 설명이네요.

 

auth 에다가

kimyuna 넣으면 풀려요.

 

빠밤!

 

키가 나왔네요.

'연구글 > suninatas.com' 카테고리의 다른 글

suninatas 28 / forensics  (0) 2021.03.06
suninatas 27 / system  (0) 2020.12.21
suninatas 25 / system  (0) 2020.12.16
suninatas 24 / system  (0) 2020.12.09
suninatas 23 / web  (0) 2020.12.07
댓글

suninatas 25 / system

2020. 12. 16. 09:48

25번 문제에요.

배점은 555점 분야는 시스템이에요.

 

LAST NUMBER

5221

 

이랑 역시나 다운로드가 있네요.

 

역시나 압축파일이 있고요.

 

역시나 확장자 없는 파일이 있고요.

 

역시나 압축파일이고요.

 

역시나 APK파일이니

 

jadx로 뜯어보면

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package com.example.suninatas25;
 
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.text.Editable;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
 
public class Suninatas25 extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        ((Button) findViewById(R.id.btn_send)).setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                Editable id = ((EditText) Suninatas25.this.findViewById(R.id.input_id)).getText();
                Editable pw = ((EditText) Suninatas25.this.findViewById(R.id.input_pw)).getText();
                String conName = Suninatas25.this.getContacts("sb");
                try {
                    String conNum = Suninatas25.this.getTel(Suninatas25.this.getContacts("id"));
                    if (conName != null) {
                        Suninatas25.this.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("http://www.suninatas.com/challenge/web25/chk_key.asp?id=" + id.toString() + "&pw=" + pw.toString() + "&Name=" + conName.toString() + "&Number=" + conNum.toString())));
                    }
                } catch (Exception e) {
                    new AlertDialog.Builder(Suninatas25.this).setMessage("Wrong!").setNeutralButton("Close"new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int which) {
                            dialog.dismiss();
                        }
                    }).show();
                }
            }
        });
    }
 
    public String getTel(String Idno) {
        StringBuffer tnum = new StringBuffer();
        Cursor phones = getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, (String[]) null"contact_id=" + Idno, (String[]) null, (Stringnull);
        while (phones.moveToNext()) {
            tnum.append(phones.getString(phones.getColumnIndex("data1")));
        }
        return tnum.toString();
    }
 
    public String getContacts(String Sel) {
        StringBuffer sb = new StringBuffer();
        Cursor contacts = getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, (String[]) null, (Stringnull, (String[]) null, (Stringnull);
        while (contacts.moveToNext()) {
            String displayName = contacts.getString(contacts.getColumnIndex("display_name"));
            String contactId = contacts.getString(contacts.getColumnIndex("_id"));
            if (displayName.equals("SuNiNaTaS")) {
                if (Sel.equals("sb")) {
                    sb.append(displayName);
                } else if (Sel.equals("id")) {
                    sb.append(contactId);
                }
            }
        }
        return sb.toString();
    }
 
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
}
cs

이런게 있어요.

 

29번라인에

Uri.parse("http://www.suninatas.com/challenge/web25/chk_key.asp?id=" + id.toString() + "&pw=" + pw.toString() + "&Name=" + conName.toString() + "&Number=" + conNum.toString())

에다가 GET를 날리네요.

 

idpw 자기 id/pw 인거같고

Name은 코드를 다 읽어보진 않았지만 대놓고 57번라인에

displayName.equals("SuNiNaTaS")

수상한게 있으니

SuNiNaTaS 넣어보고...

Number

아까 처음에 나왔던

LAST NUMBER

5221

이 너무 수상하니 5221 을 넣어서

 

Get를 때려보면

아 저거 URL 다른게 자동으로 저기로 리디렉션되서 날아가더라고요.

 

암튼

 

Hmm... Are you sure you are using your app?

 

가 뜨네요.

 

피들러로 User-Agent Android로 바꿔서 해보면?

 

빠밤!

 

키가 나왔네요.

'연구글 > suninatas.com' 카테고리의 다른 글

suninatas 27 / system  (0) 2020.12.21
suninatas 26 / forensics  (0) 2020.12.17
suninatas 24 / system  (0) 2020.12.09
suninatas 23 / web  (0) 2020.12.07
suninatas 22 / web  (0) 2020.12.04
댓글

suninatas 24 / system

2020. 12. 9. 16:10

24번 문제에요.

배점은 333점, 분야는 시스템이래요.

 

파일 다운로드가 있어요.

받으면 .zip 파일을 던져주는데

 

안에는 확장자가 없는 파일이 있어요.

 

헤더를 보면

50 4B 03 04 . . .

이니 zip 파일이겠네요.

 

열어보면

흐으으으음.

APK 파일이었네요.

뭐 상관없지만요.

 

코드를 보기위해 jadx 가지고 classes.dex 파일을 열어보면

 

com.suninatas.suninatas24 라는 수상한 클래스가 있네요.

안의 MainActivity 를 살펴보면 이런게 나와요.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.suninatas.suninatas24;
 
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.Editable;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
 
public class MainActivity extends Activity {
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.activity_main);
        ((Button) findViewById(R.id.btn_send)).setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                Editable text = ((EditText) MainActivity.this.findViewById(R.id.input_id)).getText();
                Editable text2 = ((EditText) MainActivity.this.findViewById(R.id.input_pw)).getText();
                Editable text3 = ((EditText) MainActivity.this.findViewById(R.id.input_key)).getText();
                if (text3.toString().equals("https://www.youtube.com/channel/UCuPOkAy1x5eZhUda-aZXUlg")) {
                    MainActivity mainActivity = MainActivity.this;
                    mainActivity.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("http://www.suninatas.com/challenge/web24/chk_key.asp?id=" + text.toString() + "&pw=" + text2.toString() + "&key=" + text3.toString())));
                    return;
                }
                new AlertDialog.Builder(MainActivity.this).setMessage("Wrong!").setNeutralButton("Close"new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialogInterface, int i) {
                        dialogInterface.dismiss();
                    }
                }).show();
            }
        });
    }
 
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
}
cs

대충 보면

 

www.suninatas.com/challenge/web24/chk_key.asp?id=자기아이디&pw=자기비밀번호&key=www.youtube.com/channel/UCuPOkAy1x5eZhUda-aZXUlg

 

여기에다가 GET를 때리는거같네요.

 

직접 접근해보면

 

해킹하지 말래요.

비밀번호의 특수문자 때문인가봐요.

아무튼 비밀번호를 특수문자 없는걸로 바꾸고 자고 일어난다음

저 파일의 확장자를 .apk 로 바꾸고 자기 ID PW를 넣고 key를 넣으면 FLAG가 나올거에요.

아님말고

 

아무튼

빠밤!

 

키가 나왔...네요?

 

www.youtube.com/channel/UCuPOkAy1x5eZhUda-aZXUlg  

 

이재빈

★(아직) 고졸 개발자 이재빈의 상큼발랄한 브이로그 채널★ 희망과 사랑을 찾을 수 있는 영상이 업로드됩니다!! 힘들었던 하루의 마무리는 재빈로그와 함께♥

www.youtube.com

뭐하다가 박제당하셨는지는 모르겠지만 가서 구독이나 눌러주자고요~

돈먹은거 아님

'연구글 > suninatas.com' 카테고리의 다른 글

suninatas 26 / forensics  (0) 2020.12.17
suninatas 25 / system  (0) 2020.12.16
suninatas 23 / web  (0) 2020.12.07
suninatas 22 / web  (0) 2020.12.04
suninatas 21 / forensics  (0) 2020.12.03
댓글

suninatas 23 / web

2020. 12. 7. 15:36

23번 문제에요.

배점은 444점, 분야는 웹이에요.

마지막 웹문제에요.

 

22번문제가 강화되서 나왔네요.

admin 이 필터링되있으니

 

ad'+'min' 으로 우회하면

 

작동하죠.

 

결과가 없을때 나오는 문구도

 

동일하네요.

 

그러니 전처럼 길이를 찾아보면

 

12일때

 

OK admin 을 띄우죠.

 

substring 가 막혀있으니 left 로 우회해서 풀면 되겠네요.

 

그런데 3번째 글자에

 

????

글자수가 30자가 넘으면 안된대요.

 

그러니 앞의 ad'+'min' 을 지우고 or 을 사용해보면?

잘 작동하네요.

 

그렇게 10글자까지는 구했는데 여기서 더 길이를 줄일 수 없네요.

 

right 로 끝의 두글자를 따내보면

 

li 일때

OK admin

을 띄우네요.

 

v3ryhardsq + li

 

v3ryhardsqli

 

빠밤!

 

키가 나왔네요.

'연구글 > suninatas.com' 카테고리의 다른 글

suninatas 25 / system  (0) 2020.12.16
suninatas 24 / system  (0) 2020.12.09
suninatas 22 / web  (0) 2020.12.04
suninatas 21 / forensics  (0) 2020.12.03
suninatas 19 / forensics  (0) 2020.08.27
댓글

suninatas 22 / web

2020. 12. 4. 18:51

22번 문제에요.

배점은 332점, 분야는 웹이에요.

 

BSQLI를 하래요.

그리고 친절하게 필터링되는 키워드까지 적어주네요.

 

암튼 admin'-- / a 를 넣어보면?

 

OK admin

 

admin / a 를 넣어보면?

False

 

그러니 길이 구문은 admin'and(length(pw)=1)-- 로.

값 구문은 admin'and(substr(pw,1,1)='a')-- 로 해서

 

돌려보면?

 

????

DB 환경이 MYSQL이 아닌가보네요.

 

mssql 식으로

lensubstring 를 써서 해보면?

 

END - "N1c3Bilnl)"

저걸 넣어보면?

 

빠밤!

로그인이 되네요.

 

키는 저 비밀번호에요.

'연구글 > suninatas.com' 카테고리의 다른 글

suninatas 24 / system  (0) 2020.12.09
suninatas 23 / web  (0) 2020.12.07
suninatas 21 / forensics  (0) 2020.12.03
suninatas 19 / forensics  (0) 2020.08.27
suninatas 18 / forensics  (0) 2020.08.27
댓글

21번 문제에요.

배점은 221점, 분야는 포렌식이에요.

깨진 이미지를 던져주네요.

다운로드 받아보면

 

 

solution Key is H4??????????????????N_TH3_MIDD33_4??4CK

이런 이미지가 있는데...

 

파일 크기가 왜저래...?

 

파일크기가 너무 수상하니 HxD로 뜯어봤어요.

안에 이미지가 여러장 숨어있을거같은 그런 느낌이 드네요.

 

빙고.

 

 

solution Key is H4CC3R_IN_TH3_MIDD33_4??4CK

첫번째 이미지를 분리해내니 저런게 뜨네요.

그래도 크기가 여전히 너무 크니 한번 더 찾아보면

 

빠밤!

 

solution Key is H4CC3R_IN_TH3_MIDD33_4TT4CK

또 분리가 되면서

 

키가 나왔네요.

'연구글 > suninatas.com' 카테고리의 다른 글

suninatas 23 / web  (0) 2020.12.07
suninatas 22 / web  (0) 2020.12.04
suninatas 19 / forensics  (0) 2020.08.27
suninatas 18 / forensics  (0) 2020.08.27
suninatas 17 / misc  (0) 2020.08.27
댓글