> For the complete documentation index, see [llms.txt](https://docs.cooku222.kr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cooku222.kr/security/mobile/frida-lab/frida-labs-0x7.md).

# Frida-Labs 0x7

출처: <https://github.com/DERE-ad2001/Frida-Labs/tree/main/Frida%200x7>

***

```
C:\Users\after\Downloads>adb install Challenge_0x7.apk
Performing Streamed Install
Success
```

마찬가지로 설치로 시작

<figure><img src="https://blog.kakaocdn.net/dna/BB6XQ/dJMcacPCzg4/AAAAAAAAAAAAAAAAAAAAAMTA_rtgopcFZB1-MeFaKO_gp5vy0R0Xon5pknnOx4lE/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=Nqe%2FtbGRsr7EgmyORYuxzrPGDyg%3D" alt="" height="223" width="1363"><figcaption></figcaption></figure>

Checker에서 받는 인자 A의 num1, num2이 512보다 커야한다.&#x20;

<figure><img src="https://blog.kakaocdn.net/dna/cHgJDH/dJMcadnpCaz/AAAAAAAAAAAAAAAAAAAAAO8Bx2MJKtSqqX5FIKAj5WrSai6XM9rMOsip_CgAa0ca/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=aySMz0opawJXvWKUGN4f87iZ2%2BM%3D" alt="" height="387" width="490"><figcaption></figcaption></figure>

Checker의 형태는 이렇게 생겼다.&#x20;

```
Java.performNow(function() {
  Java.choose('com.ad2001.frida0x7.MainActivity', {
    onMatch: function(instance) {
    console.log("Instance found");

    var checker = Java.use("com.ad2001.frida0x7.Checker");
    var checker_obj  = checker.$new(600, 600); // Class Object
    instance.flag(checker_obj); // invoking the get_flag method
  },
    onComplete: function() {}
  });
});
```

Frida 자바스크립트 코드만 보면 이런데, 인스턴스에 넣어주는 값에 어차피 512만 크면 되니 깔끔하게 600으로 넣어준다. 그리고 flag()를 후킹하는 함수를 만들어준다.

```
C:\Users\after\Downloads>frida -U -f com.ad2001.frida0x7
     ____
    / _  |   Frida 17.5.1 - A world-class dynamic instrumentation toolkit
   | (_| |
    > _  |   Commands:
   /_/ |_|       help      -> Displays the help system
   . . . .       object?   -> Display information about 'object'
   . . . .       exit/quit -> Exit
   . . . .
   . . . .   More info at https://frida.re/docs/home/
   . . . .
   . . . .   Connected to Android Emulator 5554 (id=emulator-5554)
Spawned `com.ad2001.frida0x7`. Resuming main thread!
[Android Emulator 5554::com.ad2001.frida0x7 ]-> Java.performNow(function() {
  Java.choose('com.ad2001.frida0x7.MainActivity', {
    onMatch: function(instance) {
    console.log("Instance found");

    var checker = Java.use("com.ad2001.frida0x7.Checker");
    var checker_obj  = checker.$new(600, 600); // Class Object
    instance.flag(checker_obj); // invoking the get_flag method
  },
    onComplete: function() {}
  });
});
Instance found
```

&#x20;

<figure><img src="https://blog.kakaocdn.net/dna/bovxg5/dJMcadHHXVq/AAAAAAAAAAAAAAAAAAAAABZxPac-zhc6TTw2FcWIri-nJxXwrODteV6wl85oX4Gm/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=uQwRBMNx5J%2FKVwErh9o1jUKdmXQ%3D" alt="" height="555" width="283"><figcaption></figcaption></figure>

&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cooku222.kr/security/mobile/frida-lab/frida-labs-0x7.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
