탈옥강좌/탈옥

오리지널 아이폰 아이팟터치 탈옥에 대한 회상

T.B 2013. 8. 19. 00:25


'tb sns' 는 iOS 단일기종 탈옥 특화 컨셉의 블로그다. 블로그를 운영하게 된 계기는 다름아닌 2009년 11월 아이폰3GS가 국내 도입되면서 갑자기 트위터 '붐'이 일어나 한글 140자로의 소통이 불편했기 때문에 좀 더 많은 내용의 전달을 위해서 시작하게 된 것이 어찌하다 보니 여기까지 오게됐다.


사실, 'tb sns'는 iOS 컨셉 블로그가 아니라 '트위터 컨셉'(참고)이었다. 블로그를 트위터 컨셉으로 잡았던 이유는 트위터 붐과 함께 트위터 고액과외가 등장하고, 팔로잉과 언팔로잉을 반복하며 의미없는 팔로워를 늘려놓고 '계정을 판매 한다던가' '무슨 나라를 위해 애국 한다며 정권의 앞잡이 노릇을 하려든다던가' '전문가 행세'를 하는 모양새가 보기 좋지 않았기 때문이다.


당시 필자가 주장하던 내용이, 과거에는 '블로그 전문가' 심지어 '이메일 전문가'도 있었다. 당장이야 전문가 행세를 하겠으나 트위터 그렇게 어렵지 않으니 조금만 배우면 혹하지 않아도 된다. 'TV 전문가' '전기밥솥' 전문가를 외치는것과 차이가 없다는 논리였다. 아이폰이 출시된 후엔 트위터에 사람들이 많아지고 블로그 성격은 자연스럽게 iOS로 넘어갔다.


'탈옥(jailbreak)' 얘기 좀 해보자. 트위터나 펌로그들을 보면(진짜.. 불펌 좀 하지 말자. 보고 배껴쓰는것 뻔히 보이는데 부끄럽지도 않니?) '요즘 탈옥 정말 쉽다. 나는 예전에 정말 너무 고생 많이 했다.' 면서 'OB'를 자처하는 분들 꽤 보인다. 그분들께서 모두 OB가 아니라는 얘기는 아니지만 친근감에 관심있게 보고 있자면 정작 탈옥에 탈짜도 모르는 경우가 많았다.


확실히 탈옥이 쉬워진건 사실이다. '아이팟터치1세대 부터 2세대/3세대/아이폰3GS/아이패드1블랙/아이패드2화이트/아이폰4 화이트/아이폰4S화이트' 까지 쭉 써오면서 쭉 탈옥해오던 '골수 iOS팬'으로써는 쉬워졌다고 할 수 밖에 없다. 요즘 탈옥은 상당히 친절(?)하여 '원클릭' 혹은 몇번의 클릭으로 불과 몇분 안에 탈옥이 가능해졌기 때문이다.


이쯤에서 그럼 과거의 탈옥은 어땠는데? 라고 궁금할 것이다. 뭐.. 과거 2007년 9월 아이팟터치 1세대 탈옥을 소개하자면 아래와 같다.


iPod Touch Full JailBreak guide for Windows


RESTORE IPOD FIRST then download iphuc http://rapidshare.com/files/61742428/iphuc.zip
-------------------
1. Load http://jailbreak.toc2rta.com on iPod

2. Exit iTunes, and kill ituneshelper.exe process

3. Extract iPhuc to directory on computer

4. Copy iTunesMobileDevice.dll from C:\Program Files\Common

Files\Apple\Mobile Device Support\bin to the same folder as iPhuc.exe

5. Copy readline5.dll from

http://gnuwin32.sourceforge.net/down...ne-bin-zip.php to the

same folder as iPhuc.exe

6. Run iPhuc.exe

7. Plug in your iPod

8. In iPhuc type "getfile /dev/rdisk0s1 rdisk0s1 314572800", this will

take a while as it's a 300mb file

9. Make a backup copy of rdisk0s1 that you just downloaded.

10. You now need to do some hex editing. The tool I use for doing this

is HxD (http://www.mh-nexus.de/hxd/). Open rdisk0s1 with your hex

editor.

11. Search for the ASCII string "noexec" in the file. The second hit

should look like the /etc/fstab file: /dev/disk0s1 / hfs ro 0 1

/dev/disk0s2 /private/var hfs rw,noexec 0 2

Only, of course, hex editors will just display newlines as a '.'

character or similar. This series of characters are often found at

0xF8F9000-0xF8F9045. They will have the following character codes:

2F 64 65 76 2F 64 69 73 6B 30 73 31 20 2F 20 68 66 73 20 72 6F 20 30 20

31 0A 2F 64 65 76 2F 64 69 73 6B 30 73 32 20 2F 70 72 69 76 61 74 65 2F

76 61 72 20 68 66 73 20 72 77 2C 6E 6F 65 78 65 63 20 30 20 32 0A

(In "find" make sure it's set to find hex values)

12. Change these to /dev/disk0s1 / hfs rw 0 1 /dev/disk0s2 /private/var

hfs rw 0 2

With newlines padding the end of the string so it ends up being exactly

the same size as the old /etc/fstab. The new series of characters ought

to be:

2F 64 65 76 2F 64 69 73 6B 30 73 31 20 2F 20 68 66 73 20 72 77 20 30 20

31 0A 2F 64 65 76 2F 64 69 73 6B 30 73 32 20 2F 70 72 69 76 61 74 65 2F

76 61 72 20 68 66 73 20 72 77 20 30 20 32 0A 0A 0A 0A 0A 0A 0A 0A

13. Save your changes. I'm assuming that you're replacing the old

rdisk0s1 file on your hard drive with this modified version. As a final

safety check, make sure the file sizes of your modified version and your

backup versions are exactly the same, down to the last byte.

14. Upload the modified rdisk0s1 image to your iPod. In iPhuc, type

"putfile rdisk0s1 /dev/rdisk0s1".

15. Exit iPhuc and reboot your iPod

16. Open iPhuc again so it connects to your freshly rebooted iPod. As a

check, type "getfile /etc/fstab". This will download fstab to iPhuc's

directory. Open it up with your favorite text editor and confirm that

the changes we have made are still there. If they are, congratulations.

You have a jailbroken iPod. Sort of.

17. We now need to install ssh and associated tools. This is all now old

territory, but unfortunately, everything is either "one-click" or

designed for Macs. Thus we need to do some sweating here. Download

http://iphone.natetrue.com/dropbearkey.exe. You will also need

cygwin1.dll from

http://www.dll-files.com/dllindex/dl....shtml?cygwin1.

18. Open CMD and do:

dropbearkey -t rsa -f dropbear_rsa_host_key
dropbearkey -t dss -f dropbear_dss_host_key

You should now have two files in that directory, dropbear_rsa_host_key

and dropbear_dss_host_key. Copy or move these into your iPhuc directory.

19. Download and extract http://iphone.natetrue.com/BSD_Base-2.0.tar.gz

into your iPhuc directory.

20. Download and extract

http://www.abigato.com/iphone-ssh-kit-vr1.tar.bz2 into your iPhuc

directory. Make sure dropbear, fd6, au.asn.ucc.matt.dropbear.plist,

glob6, goto, osh and sh6 are in the same directory as iPhuc.exe. Move

them there if you have to.

21. Open up iPhuc and type in "mkdir /etc/dropbear",

22. "cd /etc/dropbear".

---
DIRECTORIES ARE
/etc/dropbear/dropbear_rsa_host_key,

/etc/dropbear/dropbear_dss_host_key, /bin/chmod, /bin/sh and

/usr/bin/dropbear
---

23. "putfile dropbear_rsa_host_key"

24. "putfile dropbear_dss_host_key"

25. "cd /bin"

26. "putfile chmod"

27. Rename sh6 in your iPhuc directory to sh, then "putfile sh" in

iPhuc.

28. "cd /usr/bin"

29. "putfile dropbear"

30. Make sure /etc/dropbear/dropbear_rsa_host_key,

/etc/dropbear/dropbear_dss_host_key, /bin/chmod, /bin/sh and

/usr/bin/dropbear now exist on your iPod with iPhuc.

31. "cd /usr/sbin"

32. "getfile update"

33. In Windows Explorer, rename "update", which you just downloaded, to

"update.orig".

34. Rename "chmod" in the iPhuc folder to "update".

35. In iPhuc, "putfile update", so you're replacing /usr/sbin/update

with chmod.

36. "cd /System/Library/LaunchDaemons/"

37. "getfile com.apple.update.plist"

38. Open com.apple.update.plist in a text editor

Right after it says <string>/usr/sbin/update</string> add:

<string>555</string>
<string>/bin/chmod</string>
<string>/bin/sh</string>
<string>/usr/bin/dropbear</string>

39. Save the file. Upload the modified version with "putfile

com.apple.update.plist"

40. Also, "putfile au.asn.ucc.matt.dropbear.plist"

41. Reboot the iPod twice. The first reboot should set the required

permissions. The second should start the ssh server (since proper

permissions are now set). And close iPhuc.

42. Theoretically, SSH should be working now. Find out the IP of your

iPod in the iPod's wireless settings.

43. Try to ssh to it with Putty

(http://www.chiark.greenend.org.uk/~s.../download.html).

Username root, password alpine.

---
So, okay, now we need to get sftp running, do some clean-up and then I

think we can install Installer.app and be good.

Download WinSCP (http://winscp.net/download/winscp404setup.exe)
---

44. Download http://apps.iphonexe.com/24940.zip. You will need

/libexec/sftp-server, /usr/bin/scp and /usr/lib/libarmfp.dylib from that

archive. Extract them all to your iPhuc folder.

45. Using iPhuc's putfile capability, put sftp-server in /usr/libexec/,

put scp in /usr/bin/, and put libarmfp.dylib in /usr/lib/.

46. Remember that BSD_Base folder you extracted? We need to raid it for

some commands. You will need /bin/ls, /bin/mv, /bin/pwd, and /bin/csh.

Copy those to your iPhuc directory.

47. In iPhuc:

cd /bin
putfile ls
putfile mv
putfile pwd
putfile csh

48. SSH into your iPod. What we now need to do is chmod them all

executable.

49. In SSH, "/bin/chmod 555 /bin/ls"
50. "/bin/chmod 555 /bin/mv"
51. "/bin/chmod 555 /bin/pwd"
52. "/bin/chmod 555 /bin/csh"
53. "/bin/chmod 555 /usr/bin/scp"
54. "/bin/chmod 555 /usr/libexec/sftp-server"

Theoretically, sftp should work now, yes.

55. Also upload glob6 to "/bin" with iPhuc and in SSH, "/bin/chmod 555

/bin/glob6".

56. Type "/bin/csh" to test out this shell (in SSH). This has advantages

of not requiring you to type in the full path of every executable in the

future.

57. In SSH "cd /var/root".

58. Type ls. You should have a Library, Mediaold, and Media directory.

59. "mv Media Media_sym"

60. "mv Mediaold Media"

61. Reboot your iPod and check your iPod in iTunes.

---
On to installing AppTap
---

62. Download and install 7-zip (http://www.7-zip.org/). We need it to

crack open the dumb Installer.app Nullsoft installer.

63. Download the Windows installer for Installer.app at

http://www.nullriver.com/~adam/AppTappInstaller.exe

64. Use 7-zip to open AppTappInstaller.exe and extract the Installer.app

folder from it.

65. Use SFTP to upload Installer.App into /Applications on your iPod.

66. In SSH, type "/bin/chmod -Rf +x /Applications/"

67. Slide to unlock your iPod then in SSH type

/Applications/Installer.app/Installer and hit return to launch

Installer.

68. After AppTapp opens, press control+c in SSH to close it

69. Open Safari on the iPod and navigate to

http://conceitedsoftware.com/iphone/beta. Please make sure while you're

doing this that the hacked TIFF image isn't loaded again. So if starts

loading, hit the X.

70. Tap yes to add it to Installer

71. Back in ssh, type "/Applications/Installer.app/Installer" and hit

return to launch Installer again.

72. Install the Community Sources package.

73. Install Trip1PogoStick located under the "System" category to

enable scrolling and applications.

74. Restart the iPod. You should be done.


PC 문서로 저장해놨던 1세대 탈옥법(via MacRumors Forums)이다. 당시를 회상하자면 오리지널 iOS를 탈옥하기 위해서는 74단계를 거쳐야만 했다. iOS의 첫번째 탈옥툴인 iOS 1.1.1 JailbreakMe 1.0(보통 AppSnapp이라 불렸다.)은 2007년 9월에 처음 등장했다.


트위터를 하다보면 블로그에 글이 하루에 5~6개는 물론이고 열댓개도 올라올 때가 있다.(요즘은 바빠서..) 같은 이유로 '전업 블로거 아님?' 이라는 소리도 꽤 들었다.(아님..) 블로그 글에는 출처(via)를 '깜빡 하고 까먹지 않는 이상' 반드시 적는 편이라 자주 오시는 분들과 트친님들은 아시겠지만 한글뉴스를 잘 안본다. 보통 모닝커피 한잔 하면서 과거에는 PC나 랩톱으로 아이패드 이후에는 아이패드로 외신을 접하고 틈틈히 생각을 정리해두었다가 글쓰는데 걸리는 시간은 약 20분 내외다.


그런데 좀 오래걸리는 글이 '탈옥'글 중 '최적화'글이다. 탈옥 후 트윅이야 본인 취향에 맞게 설치하는것이 맞는 얘기인데, 탈옥에 탈짜도 모르다가 덜컥 탈옥만 해놨으니 탈옥의 메리트를 느끼지 못하는 사용자들을 위해 새로운 iOS와 탈옥이 공개될 때 마다 '지난 5년간의 노하우'를 토대로 '최적화'라는 네이밍으로 '예제'를 제시한다.


특히 아이폰의 경우 '전화기'이기 때문에 내 글을 보는 사람들이 내 글로 인하여 벽돌폰이 되어 행여라도 전화를 일시적으로 사용할 수 없을지도 모른다는 생각에 호환성을 일일히 체크하고 직접 테스트해보고 글을 작성하기 때문에 글 작성 시간이 적게는 1시간에서 많게는 몇시간씩 걸린다.


가끔 우스게 소리로 'iOS와 탈옥(참고)에 관해서 만큼은, 한글로 된 블로그 중 최대는 아니겠으나 최고 퀄리티로 펌로그들과 기타 잡블로그들과 차원이 다른'이라는 표현을(-_-') 쓰고는 한다. 아마, '내가 지금 뭐하는 짓인가?'라는 생각을 수십번 하면서도 블로그에 대한 애정과 트친님들에 대한 애정 때문에 꾹 참고 글을 쓰던 '탈부심' 때문이었지 않나 싶다.


이제 곧 9월 10일이 되면 애플이 아이폰5S와 아이폰5C와 iOS 7을 공개할 것이고(참고) 몇몇 유명 iOS 해커들은 저마다 iOS 7에 관한 exploit을 히든으로 갖고 있다니 조만간 '화이트와 함께 iOS의 2가지 진리인 탈옥' 소식이 들리기를 기대해본다.


 T.B의 SNS 이야기 블로그의 모든 글은 저작권법의 보호를 받습니다. 어떠한 상업적인 이용도 허가하지 않으며, 이용(불펌)허락을 하지 않습니다.

▲ 사전협의 없이 본 콘텐츠(기사, 이미지)의 무단 도용, 전재 및 복제, 배포를 금합니다. 이를 어길 시 민, 형사상 책임을 질 수 있습니다.

▲ 비영리 SNS(트위터, 페이스북 등), 온라인 커뮤니티, 카페 게시판에서는 자유롭게 공유 가능합니다.


T.B의 SNS이야기 소식은 T.B를 팔로윙(@ph_TB) 하시면 실시간으로 트위터를 통해서 제공 받을 수 있습니다.

728x90
반응형