{"id":21928611,"url":"https://github.com/nuvious/htb-don-t-overreact-walkthrough","last_synced_at":"2025-03-22T12:24:40.743Z","repository":{"id":251257253,"uuid":"612012323","full_name":"nuvious/HTB-Don-t-Overreact-Walkthrough","owner":"nuvious","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-10T02:20:03.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T08:14:53.900Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nuvious.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-10T02:19:59.000Z","updated_at":"2024-08-01T17:17:08.000Z","dependencies_parsed_at":"2024-08-01T20:44:56.227Z","dependency_job_id":"26a3d33b-d222-4eac-8692-c4ebbcc4cd99","html_url":"https://github.com/nuvious/HTB-Don-t-Overreact-Walkthrough","commit_stats":null,"previous_names":["nuvious/htb-don-t-overreact-walkthrough"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuvious%2FHTB-Don-t-Overreact-Walkthrough","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuvious%2FHTB-Don-t-Overreact-Walkthrough/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuvious%2FHTB-Don-t-Overreact-Walkthrough/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuvious%2FHTB-Don-t-Overreact-Walkthrough/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuvious","download_url":"https://codeload.github.com/nuvious/HTB-Don-t-Overreact-Walkthrough/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244955006,"owners_count":20537874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T22:27:04.245Z","updated_at":"2025-03-22T12:24:40.717Z","avatar_url":"https://github.com/nuvious.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTB - Don't Overreact\n\nThis is a walkthrough of the [Don't Overreact](https://app.hackthebox.com/challenges/dont-overreact)\nchallenge on [Hack the Box](https://app.hackthebox.com/).\n\n## Initial Analysis\n\nAn easy first step is to try running the application. Installing it on an android emulator one can see the app simply\npresents a black screen with the Hack the Box logo in the middle:\n\n![screenshot](res/app-screenshot.png)\n\nSwipe, touch and other gestures on the app don't seem to do anything and there's no option to share things to the app\nitself.\n\n## Decompile\n\nWith no indication of how to get the flag from the actual UI, we can move on to decompilation. The tool of choice in\nmost cases for this is [apktool](https://ibotpeaches.github.io/Apktool/). For convenience a dockerfile has been provided\nwhich containerizes this application:\n\n### Linux\n\n```bash\n# Build the container\ndocker build -t apktool . \n# Decompile the apk\ndocker run --rm -it -v $PWD:/workspace apktool d app-release.apk\n```\n\n### Windows\n\n```bash\n# Build the container\ndocker build -t apktool . \n# Decompile the apk\ndocker run --rm -it -v ${pwd}:/workspace apktool d app-release.apk\n```\n\n![unpack](res/apktool-unpack.png)\n\n## Code Analysis\n\nLooking at the code we can see this app is based off of React, specifically react-native:\n\n```java\n# app-release/smali/com/awesomeproject/MainActivity.smali\n.class public Lcom/awesomeproject/MainActivity;\n.super Lcom/facebook/react/ReactActivity;\n.source \"MainActivity.java\"\n```\n\nFor React Native apps, the main guts of the application actually live in `assets/index.android.bundle`. As discussed on\nHackTrick's article on [ReactNative Application](https://book.hacktricks.xyz/mobile-pentesting/android-app-pentesting/react-native-application)\nhacking, one can simply create an index.html file that includes the file as a script:\n\n```html\n\u003c!-- index.html; put in same folder as index.android.bundle --\u003e\n\u003cscript src=\"index.android.bundle\"\u003e\u003c/script\u003e\n```\n\nNow just open the `index.html` file up and hit `F12` in your browser to view the source that actually makes the app\nwork.\n\n## Getting the Flag\n\nLooking through the source a naive search for `HTB{}` doesn't turn up anything. However, a chunk of code does pop out\nas unusual:\n\n```javascript\n__d(function(g, r, i, a, m, e, d) {\n    Object.defineProperty(e, \"__esModule\", {\n        value: !0\n    }),\n    e.myConfig = void 0;\n    var t = {\n        importantData: \"baNaNa\".toLowerCase(),\n        apiUrl: 'https://www.hackthebox.eu/',\n        debug: 'SFRCe1RISVNfSVNfTk9UX1RIRV9GTEFHX2JhTmFOYX0='\n    };\n    e.myConfig = t\n}, 400, []);\n```\n\n**baNaNa** aside we have a base64 string which if decoded drops the flag:\n\n```bash\necho \"SFRCe1RISVNfSVNfTk9UX1RIRV9GTEFHX2JhTmFOYX0=\" | base64 -d\nHTB{THIS_IS_NOT_THE_FLAG_baNaNa}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuvious%2Fhtb-don-t-overreact-walkthrough","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuvious%2Fhtb-don-t-overreact-walkthrough","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuvious%2Fhtb-don-t-overreact-walkthrough/lists"}