info Model Name Xiaomi MI6 Date 2019-11-22 CVE X DESC Pwn2own 2018에서 발표된 내용으로 Xiaomi Mi6 와이파이와 연결할 때 [Captive Portal] 기능을 이용하여 RCE가 가능한 내용 Xiaomi Mi6은 Captive Portal이 사용되면 사용자에게 먼저 알리지 않고 로컬 서버로 리다이렉션 함 connect.rom.miui.com 로컬 웹 서버 “http://connect.rom.miui.com/generate_204” 에는 HTML 페이로드가 포함되는데 이 작업을 수행하면 CaptivePortal 앱이 자동으로 열림 intent:// 스키마를 사용하여 안드로이드 어플리케이션 특정 activity를 호출함 intent://testing...
lua 스크립트를 컴파일하면 lua bytecode가 만들어진다. 파일을 확인할 때 헤더를 먼저 확인하는 편이라서 lua bytecode도 헤더부터 확인했다. ver 5.1 lua 5.1 byecode를 hex로 보면 아래와 같은 값을 가지고 있다. 그 중 5.1 버전의 헤더 크기는 총 12 bytes 이다. 이는 lua를 만드는 소스코드 중 lundump.h에 정의되어 있다. 각 헤더가 의미하는 바는 아래와 같다. [offset 1~4] lua bytecode는 파일 시그니처로 0x1B4C7561을 가진다. [offset 5] 이 후 lua의 버전을 정의하는데 0x51은 lua 5.1 버전, 0x52는 lua 5.2 버전, 0x53은 lua 5.3 버전을 의미한다. [offset 7] endian을 정..
최근에 분석한 Router 들을 보면 OpenWrt OS 기반의 웹 인터페이스를 참 많이 사용하고 있다. OpenWrt의 uhttpd는 cgi-bin/으로 요청을 보내는데 이를 처리하는 것이 lua bytecode이다. 그런데 이 lua bytecode는 이미 컴파일 되어있는 파일이라 분석하기 어려워 디컴파일이 필요하다. lua bytecode의 디컴파일러 중 하나인 luadec을 설치하는 내용이다. (unluac.jar를 이용해도 디컴파일이 가능) https://github.com/viruscamp/luadec viruscamp/luadec Lua Decompiler for lua 5.1 , 5.2 and 5.3. Contribute to viruscamp/luadec development by cre..
1. file install # git clone https://github.com/rampageX/firmware-mod-kit.git# cd firmware-mod-kit또는file download( https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/firmware-mod-kit/fmk_099.tar.gz ) → tar -xvf fmk_099.tar.gz 2. library install #apt-get install build-essential zlib1g-dev liblzma-dev python-magic 3. #cd src/#./configure#make 4. use#./extract-firmware.s..
