'주옥같은사이트주저리'에 해당되는 글 22건
- 2012.01.28 [프로그래밍]python 강좌들
- 2012.01.07 [Site]Download Streaming videos
- 2011.12.25 [펌]Wiki Crack prevention
- 2011.12.16 [Link]Anti-unpacking tricks
- 2011.12.13 [LINK]유용한 강좌 사이트
- 2011.12.10 [LINK]iOS 5 - Cydia Tweaks Compatibillity List & Notification Center Widgets
- 2011.11.06 [**좌표]각종 게임 토렌트 좌표덜이 있는곳의 좌표
- 2011.10.14 [펌]가끔 유용하게 사용되는 무료 프록시서버 리스트
- 2011.06.15 [링크]ARM 아키텍쳐
- 2011.06.04 [mobile]apple idevice 관련 정보
1. Jump to Phyhon
Link : http://wikidocs.net/mybook/read/page?pageid=1
아시는 분은 대부분아시는 박응용님께서 만드신 Jump to Python..
위키독스를 이용하여 자료를 모두 열람 가능하다..
강추!
사이트 이전 : http://codejob.co.kr/docs/page/341/
2. 왕초보를 위한 파이썬 프로그래밍 강좌
Link : http://turing.cafe24.com/
사이트는 허술해 보일지몰라도 내용은 그렇지않다는..
잼있고 쉽게 진행 할 수 있는 사이트~
3. 파이썬 마을
Link : http://bbs.python.or.kr/
국내의 파이썬 커뮤니티..
많은 사람들이 숙제를 한다는... 많은 정보를 얻을 수 있다.
펌(원문) : http://rudrn85.blog.me/90053958482
'주옥같은사이트주저리' 카테고리의 다른 글
[LINK]milw0rm 대체 사이트. (0) | 2012.02.29 |
---|---|
[펌]THUMB Instruction Set (0) | 2012.02.07 |
[Site]Download Streaming videos (0) | 2012.01.07 |
[펌]Wiki Crack prevention (0) | 2011.12.25 |
[Link]Anti-unpacking tricks (0) | 2011.12.16 |
Link : http://keepvid.com/
'주옥같은사이트주저리' 카테고리의 다른 글
[펌]THUMB Instruction Set (0) | 2012.02.07 |
---|---|
[프로그래밍]python 강좌들 (0) | 2012.01.28 |
[펌]Wiki Crack prevention (0) | 2011.12.25 |
[Link]Anti-unpacking tricks (0) | 2011.12.16 |
[LINK]유용한 강좌 사이트 (0) | 2011.12.13 |
Crack prevention
From iPhone Development Wiki
Contents[hide] |
How cracking works
Redistribution
The first step of crackers is to get the redistributable files. Crackulous and AppCrack are the notorious examples of cracking the DRMs and get the redistributable IPAs for installation on unauthorized devices.
AppStore
AppStore apps are all encrypted when downloaded, to prevent reverse engineering, and ensure every account can only run their own copy. The CPU, however, is unable to run encrypted instructions. Everything must be decrypted by the time it is loaded into the RAM. Crackers exploit this fact, and uses GDB to dump the decrypted data, so that these apps can be run anywhere.
In detail, every protected app has an LC_ENCRYPTION_INFO load command. This load command looks like:
#define LC_ENCRYPTION_INFO 0x21 struct encryption_info_command { uint32_t cmd; uint32_t cmdsize; uint32_t cryptoff; // file offset of first encrypted byte uint32_t cryptsize; // file size of encrypted data uint32_t cryptid; // method of encryption };
when the binary is encrypted, this load command must exist, and all the 3 crypt*** fields are nonzero. For deCrypt, xCrack and alike, the GDB command to get the dump is like this:
set sharedlibrary load-rules ".*" ".*" none # Don't load any symbols and libraries automatically set inferior-auto-start-dyld off set sharedlibrary preload-libraries off set sharedlibrary load-dyld-symbols off handle all nostop # Ignore all terminating signals. rb doModInitFunctions # Breaks when dyld starts. command 1 # When the breakpoint is reached, dump the encrypted content and quit. dump memory output.bin 0x2000 (cryptsize + 0x2000) kill quit end start
This script will execute before the app's user code comes into play, and therefore you have no chance to deploy a working prevention against it (PT_DENY_ATTACH won't work).
CydiaStore and RockApp
CydiaStore and RockApp, in a nutshell, are just repositories with a secure, authenticated connection on top of the usual APT/DPKG system. Unlike AppStore there isn't additional encryption/DRM. Therefore all the crackers need is to obtain the download .deb file.
Crack prevention
General techniques
All anti-piracy checking won't 100% prevent crackers because they have total access to your code. But they can delay the cracks from appearing early and hurt legitimate sales.
Multi-pass check
To make crackers a hard day a simple method is to have multitudes of checks at different locations. A convenient method is to define an always inline function, e.g.
__attribute__((always_inline)) void check_crack(symbol, length, result) { if (checksum(symbol, length) != result) exit(0); } ... check_crack(my_inline_uuid_check, 0x200, 0x12345678); register int res = my_inline_uuid_check(); ... check_crack(my_inline_serial_number_check, 0x200, 0x87654321); ...
The key point here is always_inline. Without inlining, the cracker could simply patch the check_crack() function to do nothing and your anti-crack will fail immediately.
Do not make the check computationally too expensive, otherwise legitimate users will be affected too.
Anti-redistribution
These are methods which can delay the time the first redistributable copy appear.
Anti-analysis
Avoids your binary being analyzed.
Malformed Mach-O Binaries
Many reverse engineering tools, including otool, gdb, class-dump, etc. will blindly trust the Mach-O file to be well-formed. If a Mach-O file is malformed these tools will fail to work. On the other hand, the kernel is more resistant to these corruptions, making it viable to be run.
One proved method is to set a wrong value to the number of sections in a segment command. Unfortunately, both ldid and dyld cannot recover from this kind of error, making such binaries not runnable nor linkable. But you can do the following to get your dylib/executable working: ldid -S the binary, modify nsects and then recreate the SHA with ldid -s. After that the binary is fully usable on the iDevice.
Crackers can simply fix the count to perform their analysis.
PT_DENY_ATTACH
PT_DENY_ATTACH[1] is an Apple-specific constant that can prevent debuggers (gdb, DTrace, etc.) from debugging your binary in kernel-level. Calling
ptrace(PT_DENY_ATTACH, 0, 0, 0);
will send a SEGFAULT to its tracing parent. Nevertheless, since ptrace has a well-defined address, a simple GDB macro is enough to break this[2]:
break ptrace commands 1 return continue end
Nevertheless, since the ptrace is built inside the kernel, which the userspace interface only performs syscall 26[3], as long as your assembly code resembles
mov r0, #31 mov r1, #0 mov r2, #0 mov r3, #0 mov ip, #26 svc #0x80
the PT_DENY_ATTACH will be installed and there is no way GDB can workaround it. The cracker can still use patching techniques to nop out the svn #0x80 instructions, but checksumming would help in these cases. Also make sure you don't compile your binary in thumb, cause the compiler will fail due to limited availability of registers in thumb mode.
Obfuscation
Strip symbols
Stripping symbols makes it hard to guess the purpose of a routine.
Minimize use of Objective-C
To support the runtime features, Objective-C-based binaries need to retain a lot of class information, which is enough to rebuild the class interface. These information cannot be stripped away. Therefore, all essential stuff should be done using C or C++.
Generate strings dynamically
Even if you have stripped the binary, there is must still be a constant string pool. If you use some visual technique to inform the user they're using a cracked version, the crackers can quickly track down where the view is generated with strings and disable your check.
Legitimacy check
Check if encryption is intact
This is only meaningful for AppStore apps. If the binary is not yet decrypted, the LC_ENCRYPTION_INFO load command should still exist and all its fields are nonzero. There is a sample code in http://landonf.bikemonkey.org/2009/02/index.html showing how to check this.
Deprecated or not working methods
Kali Anti-Piracy
Kali Anti-Piracy, developed by RiP-Dev, was the first generic AppStore crack prevention mechanism announced. Since RiP-Dev has been closed down, Kali's status is doubtful enough to be considered obsoleted.
Kali has 3 levels of protection[4]:
- Anti-debugging
- Anti-dumping
- Integrity check and dynamic code generation.
References
'주옥같은사이트주저리' 카테고리의 다른 글
[프로그래밍]python 강좌들 (0) | 2012.01.28 |
---|---|
[Site]Download Streaming videos (0) | 2012.01.07 |
[Link]Anti-unpacking tricks (0) | 2011.12.16 |
[LINK]유용한 강좌 사이트 (0) | 2011.12.13 |
[LINK]iOS 5 - Cydia Tweaks Compatibillity List & Notification Center Widgets (0) | 2011.12.10 |
'주옥같은사이트주저리' 카테고리의 다른 글
[Site]Download Streaming videos (0) | 2012.01.07 |
---|---|
[펌]Wiki Crack prevention (0) | 2011.12.25 |
[LINK]유용한 강좌 사이트 (0) | 2011.12.13 |
[LINK]iOS 5 - Cydia Tweaks Compatibillity List & Notification Center Widgets (0) | 2011.12.10 |
[**좌표]각종 게임 토렌트 좌표덜이 있는곳의 좌표 (0) | 2011.11.06 |
'주옥같은사이트주저리' 카테고리의 다른 글
[펌]Wiki Crack prevention (0) | 2011.12.25 |
---|---|
[Link]Anti-unpacking tricks (0) | 2011.12.16 |
[LINK]iOS 5 - Cydia Tweaks Compatibillity List & Notification Center Widgets (0) | 2011.12.10 |
[**좌표]각종 게임 토렌트 좌표덜이 있는곳의 좌표 (0) | 2011.11.06 |
[펌]가끔 유용하게 사용되는 무료 프록시서버 리스트 (0) | 2011.10.14 |
https://docs.google.com/spreadsheet/ccc?key=0AsbX6Mjabf0idHJRSk51NW9KUjJabTZVcTNZekVqS mc&hl=en_US#gid=0
'주옥같은사이트주저리' 카테고리의 다른 글
[Link]Anti-unpacking tricks (0) | 2011.12.16 |
---|---|
[LINK]유용한 강좌 사이트 (0) | 2011.12.13 |
[**좌표]각종 게임 토렌트 좌표덜이 있는곳의 좌표 (0) | 2011.11.06 |
[펌]가끔 유용하게 사용되는 무료 프록시서버 리스트 (0) | 2011.10.14 |
[링크]ARM 아키텍쳐 (0) | 2011.06.15 |
'주옥같은사이트주저리' 카테고리의 다른 글
[LINK]유용한 강좌 사이트 (0) | 2011.12.13 |
---|---|
[LINK]iOS 5 - Cydia Tweaks Compatibillity List & Notification Center Widgets (0) | 2011.12.10 |
[펌]가끔 유용하게 사용되는 무료 프록시서버 리스트 (0) | 2011.10.14 |
[링크]ARM 아키텍쳐 (0) | 2011.06.15 |
[mobile]apple idevice 관련 정보 (0) | 2011.06.04 |
'주옥같은사이트주저리' 카테고리의 다른 글
[LINK]iOS 5 - Cydia Tweaks Compatibillity List & Notification Center Widgets (0) | 2011.12.10 |
---|---|
[**좌표]각종 게임 토렌트 좌표덜이 있는곳의 좌표 (0) | 2011.11.06 |
[링크]ARM 아키텍쳐 (0) | 2011.06.15 |
[mobile]apple idevice 관련 정보 (0) | 2011.06.04 |
[Link]CK's IT Blog (0) | 2011.06.04 |
'주옥같은사이트주저리' 카테고리의 다른 글
[**좌표]각종 게임 토렌트 좌표덜이 있는곳의 좌표 (0) | 2011.11.06 |
---|---|
[펌]가끔 유용하게 사용되는 무료 프록시서버 리스트 (0) | 2011.10.14 |
[mobile]apple idevice 관련 정보 (0) | 2011.06.04 |
[Link]CK's IT Blog (0) | 2011.06.04 |
아.. 은제 다 올리냐 ㅡㅡ;; 이눔에 구차니즘......... (0) | 2011.05.21 |
흐흣~ 참고들 하세용~
http://iphoneroot.com
'주옥같은사이트주저리' 카테고리의 다른 글
[**좌표]각종 게임 토렌트 좌표덜이 있는곳의 좌표 (0) | 2011.11.06 |
---|---|
[펌]가끔 유용하게 사용되는 무료 프록시서버 리스트 (0) | 2011.10.14 |
[링크]ARM 아키텍쳐 (0) | 2011.06.15 |
[Link]CK's IT Blog (0) | 2011.06.04 |
아.. 은제 다 올리냐 ㅡㅡ;; 이눔에 구차니즘......... (0) | 2011.05.21 |