모바일 모의해킹을 수행을 하다보면 인증서를 설치해야할 때가 있다.
본래 뜨던 디바이스의 경우, 설치된 인증서와 그에 맞는 버프슈트를 사용하면되나 버프슈트를 업데이트를 하는경우, 혹은 신규로 세팅해줘야하는 경우가 있다.
필자는 하지 않던 모바일 모의해킹 프로젝트를 진행하지 않다가 새롭게 수행하려다보니 까먹게되어 (...) 글로 정리해두려고 한다.
해당 작업엔 프로젝트 수행 PC 내 openssl 과 adb 설치가 요구된다.
(adb 프로그램과 openssl 설치 이후 원활한 작업 수행을 위해 환경변수 설정을 해주자.)
요구 프로그램 -
Win32/Win64 OpenSSL Installer for Windows - Shining Light Productions
Minimum system requirements: Windows XP or later 32MB RAM 200MHz CPU 30MB hard drive space Recommended system requirements: Windows XP or later 128MB RAM 500MHz CPU 300MB hard drive space October 22, 2024 - OpenSSL 3.4 is available. Users should currently
slproweb.com
[TOOL]Minimal ADB and Fastboot [2-9-18]
Introduction ADB and Fastboot are arguably two of the most indispensable tools used when working with Android devices. If you really want to modify, debug, and tweak along with their countless uses in rooting, and other procedures ADB and...
xdaforums.com
![]() |
![]() |
앱 진단을 수행하고자 하는 디바이스에서 브라우저로 버프슈트 인증서 다운로드 페이지에 접근하여 'cacert.der' 이라는 이름으로 인증서를 다운받는다.
다운로드 이후, adb 를 이용하여 권한 획득 후 마운트 작업을 해주자.
adb root
adb shell "mount -o rw,remount /"
해당 명령어 수행하면 adb 는 root 권한을 얻고 전체 영역 내 쓰기 권한을 추가해준 것이다. 이후 openssl 을 이용하여 본 인증서를 바꿔준다.
openssl x509 -inform DER -in cacert.der -out cacert.pem
openssl x509 -inform PEM -subject_hash_old -in cacert.pem
mv cacert.pem 9a5ba575.0
해당 명령을 수행하게 되면 해시값과 'cacert.pem' 이라는 파일이 본 디렉토리 내 저장된 사실이 확인 가능하다. 해당 파일을 다음 명령을 통해 디바이스 내로 밀어넣는다. (adb가 root 권한이 있어 어렵지 않게 밀어넣기가 가능하다.)
이후 해당 파일에 대한 권한 부여를 통해 시스템에서 읽게 한 이후, 읽기권한으로 리마운트를 진행한다.
adb push .\9a5ba575.0 /system/etc/security/cacerts/
adb shell "chown 644 /system/etc/security/cacerts/9a5ba575.0"
adb shell "mount -o ro,remount /"
![]() |
![]() |
이후 보안 > 암호화 및 사용자 인증 정보 > 신뢰할 수 있는 자격증명 > 시스템 에서 'PortSwigger' 이름의 인증서가 시스템 상으로 등록된 것을 확인할 수 있다.
'Tools > Burpsuite' 카테고리의 다른 글
Burpsuite Settings - Custom Certification Create (0) | 2023.03.11 |
---|