본문 바로가기
#3 취약점 항목별 상세 실습 part 2. - 안드로이드 모바일 앱 모의해킹 3.11. 안전하지 않은 로깅 메커니즘 3.11.1. 취약점 소개 -안드로이드의 커널 공간 안에 있는 로거(Logger)라는 커널 드라이브는 main, radio, event, system 이라는 네 가지 종류의 버퍼를 관리하고 있다.또한 사용자 공간에 있는 앱들은 보안 정책에 의해 커널의 버퍼에 접근할 수 없기 때문에 “/dev” 디렉터리에 리눅스 디바이스 노드들을 제공하여 앱이 로그를 읽고 쓸 수 있도록 하고 있다. -각 버퍼에 저장되는 내용은 아래와 같다.Main : 메인 앱 로그로서 앱이나 플랫폼 내부에서 android.util.Log 클래스로 기록된 로그Event : 시스템에서 발생하는 이벤트 정보를 위한 로그Radio : 이동통신망과 관련된 이벤트 로그System : 안드로이드 플랫폼 내부의 .. 2020. 11. 21.
[Android Studio] Crash 났을 때 Log 날아가지 않도록 하기 [Android Studio] Crash 났을 때 Log 날아가지 않도록 하기 -"Android Monitor” tab -> 우상단의 Dropdown 에서 “Edit Filter Configuration” 선택 -debug 하는 package name 을 설정한 custom filter 를 하나 만들어 세팅. -Done!! android monitor, android studio, Crash, crash log, custom filter, debug, Done, dropdown, edit filter configuration, log, log 날아감, log 사라짐, logcat 초기화, pacakge name, [Android Studio] Crash 났을 때 Log 날아가지 않도록 하기 2018. 3. 8.
[ios] Memory Management Debugging. [ios] Memory Management Debugging. Enabling Guard Malloc -Guard Malloc 은 malloc library 의 스페셜 버전이다.Guard Malloc 을 enable 하면 debugging 도중에 표준 malloc library 를 Guard mallog library 로 변경한다. -Guard Malloc 은 여러 가지 기술을 이용해 메모리 에러가 발생하는 부분에서 crash 를 발생시킨다.여기서 여러 가지 기술이란 예를 들면 memoery allocation 을 Virtual memory page 에 기록하여 trace 하는 방식으로, 우연히 잘못된 메모리를 access 해도 작동하는 케이스를 방지해준다. -Guard Malloc 은 Simulator.. 2018. 2. 13.
[android] DB 를 update 혹은 insert 할 떄 주의해야 할 것 ( thread ) android, DB 를 update 혹은 insert 할 떄 주의해야 할 것 ( thread ) DB 에 write ( update or insert ) 를 할 때 2개의 다른 thread 에서 동시에 진행한다면 한 thread 에서는 실패한다. 하나가 끝나기를 기다리는 것이 아니라 바로 fail 한다. ( synchronized 와 같이 wait 상태가 아니다. )경우에 따라서는 Exception 을 내뱉는 것이 아니라, 그냥 log 에 기록하는 것이 전부이기도 하다. 이것은 singleton synchronize database instance 로 해결할 수 있다. 덧붙여 Provider 역시 multi thread 에서 접근할 수 있기 때문에 open provider의 경우 이에 대한 대처를 꼭 .. 2014. 3. 13.
[보안] 리눅스( Linux ) 기본 보안 보안, 리눅스( Linux ) 기본 보안 reference : securityproof SSH Bruteforce Attack /etc/passwd 파일에 등록되어 있는 각 계정과 패스워드를 무작위 대입하는 방법 사용하여 서버 접속하는 방법. 이 공격을 하면 /var/log/secure 파일에 로그가 남는다. Jul 25 08:31:32 localhost sshd[23569]: Failed password for invalid user samba from ::ffff:211.140.122.36 port 56974 ssh2 Jul 25 08:31:33 localhost sshd[23572]: Invalid user wwwrun from ::ffff:211.140.122.36 Jul 25 08:31:36 l.. 2014. 1. 27.
[android] volley library 에 대해 알아보자! 안드로이드, Volley Library 에 대해 알아보자! Android Volley Libary 의 장점 1. 모든 network request 를 자동으로 스케쥴링한다.2. 보이지 않게 disk, memory caching 을 한다.3. 강력한 request 취소 API 도 제공한다.4. customization 도 쉽게 할 수 있다.5. debugging 과 tracing tool 을 제공한다. 써보고 싶어! library 를 구할 수 있는 주소를 알려줘. git clone https://android.googlesource.com/platform/frameworks/volley 2개의 main class. 1. Request queuerequest 를 dispatch 할 때 사용되는 녀석.보통 s.. 2013. 12. 10.
[android] MultipartEntity 내용 print out 안드로이드, MultipartEntity 내용 print out. 이미지파일을 server 에 업로드하거나 할 때는 아파치 ( Apache ) 의 library 에 있는 MultipartEntity 를 이용하면 편하다. 그런데 가끔가다 MultipartEntity 에 내용이 잘 들어가서 전달되는지 궁금하곤 하다. 이럴때는 다음 코드로 MultipartEntity 내용을 print out 할 수 있다. ByteArrayOutputStream bytes = new ByteArrayOutputStream();try {entity.writeTo( bytes );} catch ( IOException e ) {Log.e( TAG, "MultipartEntity print", e );}Log.e( TAG, "Mul.. 2013. 8. 8.
[android] Strict Mode 에 대해 알아보자. 안드로이드, Strict Mode 에 대해 알아보자. 참조 : http://dev.kthcorp.com/2012/01/31/android-strict-mode-howto/ Strict Mode 가 뭐야? * Main Thread 에서 사용성을 떨어뜨리는 작업들( 대표적으로 IO )을 하지 않도록 개발자에게 Log, 강제 종료, dropbox, dialog, splash 등의 방법으로 알려주는 API 이다. * GingerBread 부터 소개되었다. * IO 작업 중에서도 file, network access 는 특히 위험하다. 그 이유는 android file system ( YAFFS, Yet Another Flash File System ) 의 경우 한 process 가 해당 파일에 접속하면, 다른 .. 2013. 7. 17.
[VB6] Built-in Function 들에 대해 공부해보자. ( MsgBox, Input, Math 함수, Formating 함수, String 함수 ) Built-in Function 들에 대해 공부해보자. [이전강좌] Control 문들에 대해 공부해보자. ( If Else, Select, Do while, For문 ) Dialog Box 들 returnValue = MsgBox( PromptStr, StyleValue, Title ) StlyeValue Constant0 vbOkOnly 1 vbOkCancel 2 vbAbortRetryIgnore 3 vbYesNoCancel 4 vbYesNo 5 vbRetryCancel StyleValue 에는 다음의 값을 더해서, icon 도 함께 표시할 수 있다. StyleValue Constant 16 vbCritical 32 vbQuestion 48 vbExclamation 64 vbInformation Re.. 2013. 6. 5.
반응형