'취약점'에 해당되는 글 2건

  1. 2010.08.03 JailBreakMe with PDF FlateDecode filter
  2. 2010.03.05 [iPhone App] iSecureCast
2010.08.03 15:26
 
 
해당 링크에서 퍼옴..
자료 보관용
http://digdog.tumblr.com/post/894317027/jailbreak-with-pdf-flatedecode-filter


Update

According to @chpwd, @comex uses CFF font stack overflow to jailbreak. (font file placed in FlateDecode stream)

If you look at the jailbreakme.com closely, it loads corresponding PDF file as image in javascript (through new Image()) to jailbreak the iOS devices.

Open the PDF file in the hex editor, you can easily find out what kind of PDF vulnerability they are using:

The jailbreak stuff saved as FlateDecode stream within that PDF file, and vulnerability occurs when Mobile Safari loaded the PDF file, letting iOS to parse the FlateDecode filter, and use the font file inside, then Kaboom.

What is FlateDecode?

According to the specification, PDF can embed raster images. They are represented by a dictionary that described the properties of the image, with an associated stream that contains image data. And those embedded images are filtered with different kinds of filters that supported in PDF, such as DCTDecode (lossy image-specific filter based on JPEG), ASCIIHexDecode (general purpose filter for ASCII stream), FlateDecode and many others.

The FlateDecode filter is a lostless general purpose filter for data compressed with zlib deflate function. You can compressed plaintext or any kinds of data with zlib and put it into FlateDecode section.

In today’s case, they put jailbreak stuff. If you decoded their FlateDecode steam, it looks like this:

If you wan to try it yourself, you can decompress the FlateDecode stream with ghostscript:

% gs — toolbin/pdfinflt.ps iPhone1,x_3.1.3.pdf output.txt

How the Vulnerability Works?

According to “Adobe Reader and Acrobat FlateDecode Integer Overflow Vulnerability”:

The vulnerability occurs when parsing a FlateDecode filter inside a PDF file. FlateDecode is a filter for data compressed with zlib deflate compression method. Several parameters can be specified for the FlateDecode filter. Those values are used in an arithmetic operation that calculates the number of bytes to allocate for a heap buffer. This calculation can overflow, which results in an undersized heap buffer being allocated. This buffer is then overflowed with data decompressed from the FlateDecode stream. This leads to a heap-based buffer overflow that can result in arbitrary code execution.

It’s a heap overflow. I don’t know if Apple fixed this on iOS or not, but it definitely looks like the cause.

Apparently my guess was totally wrong, it’s even deeper. Turns out it’s the font file embedded in FlateDecode stream that causes the stack overflow.

References

저작자 표시 비영리 변경 금지
신고
Posted by Sun2Day

댓글을 달아 주세요

2010.03.05 16:25
 
 

SecureCast는 NOWCOM(나우콤, 구 윈스테크)에서 비공개로 운영중인 보안 웹사이트였습니다.

그동안 폐쇄망으로 사내에서만 서비스를 해온 15년의 방대한 데이터베이스를 iPhone 용 App으로 공개하습니다.
(일반 Web은 조만간 공개될 예정이라 함.)


아래는 SecureCast의 아이폰용 App인 iSecureCast입니다.








iSecrueCast에는 보안이슈(뉴스)와 취약성 정보, 분석게시판, 악성코드유포지, 홈페이지 위변조 등의 서비스를 재공하고 있습니다.


저작자 표시 비영리 변경 금지
신고

'Issue' 카테고리의 다른 글

리버싱 사이트  (0) 2010.03.23
German Government: Don't use Firefox  (0) 2010.03.22
서프라이즈 - 소련이 망했던 이유 中 하나  (0) 2010.03.21
[iPhone App] iSecureCast  (0) 2010.03.05
CodeGate 2010  (0) 2010.03.01
김연아  (0) 2010.02.28
Posted by Sun2Day

댓글을 달아 주세요

2010.03.05 16:25
 
 

SecureCast는 NOWCOM(나우콤, 구 윈스테크)에서 비공개로 운영중인 보안 웹사이트였습니다.

그동안 폐쇄망으로 사내에서만 서비스를 해온 15년의 방대한 데이터베이스를 iPhone 용 App으로 공개하습니다.
(일반 Web은 조만간 공개될 예정이라 함.)


아래는 SecureCast의 아이폰용 App인 iSecureCast입니다.








iSecrueCast에는 보안이슈(뉴스)와 취약성 정보, 분석게시판, 악성코드유포지, 홈페이지 위변조 등의 서비스를 재공하고 있습니다.


저작자 표시 비영리 변경 금지
신고

'Issue' 카테고리의 다른 글

리버싱 사이트  (0) 2010.03.23
German Government: Don't use Firefox  (0) 2010.03.22
서프라이즈 - 소련이 망했던 이유 中 하나  (0) 2010.03.21
[iPhone App] iSecureCast  (0) 2010.03.05
CodeGate 2010  (0) 2010.03.01
김연아  (0) 2010.02.28
Posted by Sun2Day

댓글을 달아 주세요


티스토리 툴바