KGB messenger CTF challenge | Alerts (Medium)
チェック
すべての削除条件文
.method protected onCreate(Landroid/os/Bundle;)V
.locals 3
invoke-super {p0, p1}, Landroid/support/v7/app/c;->onCreate(Landroid/os/Bundle;)V
const v0, 0x7f09001c
invoke-virtual {p0, v0}, Lcom/tlamb96/kgbmessenger/MainActivity;->setContentView(I)V
const-string v0, "user.home"
invoke-static {v0}, Ljava/lang/System;->getProperty(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
const-string v1, "USER"
invoke-static {v1}, Ljava/lang/System;->getenv(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
if-eqz v0, :cond_0
invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z
move-result v2
if-nez v2, :cond_0
const-string v2, "Russia"
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_1
:cond_0
const-string v0, "Integrity Error"
const-string v1, "This app can only run on Russian devices."
invoke-direct {p0, v0, v1}, Lcom/tlamb96/kgbmessenger/MainActivity;->a(Ljava/lang/String;Ljava/lang/String;)V
:goto_0
return-void
:cond_1
if-eqz v1, :cond_2
invoke-virtual {v1}, Ljava/lang/String;->isEmpty()Z
move-result v0
if-nez v0, :cond_2
invoke-virtual {p0}, Lcom/tlamb96/kgbmessenger/MainActivity;->getResources()Landroid/content/res/Resources;
move-result-object v0
const/high16 v2, 0x7f0d0000
invoke-virtual {v0, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_3
:cond_2
const-string v0, "Integrity Error"
const-string v1, "Must be on the user whitelist."
invoke-direct {p0, v0, v1}, Lcom/tlamb96/kgbmessenger/MainActivity;->a(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_0
:cond_3
invoke-static {p0}, La/a/a/a/a;->a(Landroid/content/Context;)V
new-instance v0, Landroid/content/Intent;
const-class v1, Lcom/tlamb96/kgbmessenger/LoginActivity;
invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
invoke-virtual {p0, v0}, Lcom/tlamb96/kgbmessenger/MainActivity;->startActivity(Landroid/content/Intent;)V
goto :goto_0
.end method
apktool b kgb-messenger -o kgb-re.apk
Unable to access jarfile SignApk
java -jar signapk.jar testkey.x509.pem testkey.pk8 kgb-re.apk kgb-re-sign.apk
Reference
この問題について(KGB messenger CTF challenge | Alerts (Medium)), 我々は、より多くの情報をここで見つけました https://velog.io/@2rlo/KGB-messenger-CTF-challenge-Alerts-Mediumテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol