Android에서 Proxy를 잡을 경우 인증서 설치를 해줘야 HTTPS통신을 확인할 수 있습니다.


일단 [Proxy] - [Options] - [Proxy Listeners] - [Import/export CA certificate] 에서 인증서를 추출하여 파일로 저장합니다.





파일로 추출한 후에는 adb를 이용해 안드로이드 단말기에 넣어주면 되는데, 경로는 어디에 하든 굳이 상관없습니다. 





안드로이드 단말기에서 [설정] - [잠금화면 및 보안] 화면에서 [기타 보안 설정]으로 들어갑니다.



디바이스에 저장된 인증서 설치 클릭



아까 넣어주었던 cacert.der 파일이 보입니다. 클릭해서 완료 하면 설치됩니다.


인증서 설치 후 burp에서 정상적으로 https통신도 확인이 가능합니다 :)




'Mobile' 카테고리의 다른 글

Android Socket 통신 확인(with.Frida)  (2) 2019.01.18
apktool first type is not attr  (0) 2018.10.04
Uncrackable3-1  (2) 2018.06.14
APK IDA로 동적디버깅  (0) 2018.02.22
welcome to droid (codegate2018)  (2) 2018.02.11

Android에서 Proxy를 사용하는지 체크하는 경우 System.getProperty를 이용하는 방법이 존재한다.


System.getProperty(key) - 운영체제나 JVM에 의존적인 정보를 알아낼 때 사용하는 함수로써 시스템정보를 불러옴


Example)

package com.example.taehwan.proxy_integrity;

import android.provider.Settings;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.net.Proxy;
import android.util.Log;
import android.widget.*;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView textview = (TextView)findViewById(R.id.test);
// String proxy=Settings.Secure.getString(getBaseContext().getContentResolver(),Settings.Secure.HTTP_PROXY);
if(System.getProperty("http.proxyHost")!=null) {
textview.setText(System.getProperty("http.proxyHost"));
}
else
{
textview.setText("NULL!!");
}
}
}



위 방법 외에도 Settings.Secure를 이용한 방법도 존재하지만 조금더 찾아 봐야 할 것 같다..


혹시 Settings.Secure를 이용하여 Proxy Check하는 방법을 알고 계신 분은 댓글로 

예제 부탁드립니다.

====================================================================='17.12.28추가

Settings.Secure의 HTTP_PROXY옵션은 API 17 이상부터 보안취약점 때문에 사용하지 않는다고 합니다.




+ Recent posts