Home
Calendar
Certifications
Columns
Features
Forum
Resources
Vitals
Latest Additions
April 2013 Free Giveaway Sponsor - eLearnSecurity
Human Intelligence to Navigate the Security Data Deluge
February 2013 Free Giveaway Winner of SANS CyberCon Training
Interview: Bugcrowd Founders on Herding Ninjas for Crowdsourced Bug Bounties
Network Forensics: The Tree in the Forest
March 2013 Free Giveaway Sponsor - Mile2
Book Review: Violent Python
February 2013 Free Giveaway Sponsor - SANS
Holiday 2012 Free Giveaway Winner of Metasploit Pro by Rapid7
Course Review: SANS FOR408 Computer Forensic Investigations – Windows In-Depth
The Security Consulting Sugar High
Tutorial: Fun with SMB on the Command Line
Interview: Ilia Kolochenko, CEO of High-Tech Bridge
October 2012 Free Giveaway Winner of LearningGate Training
The Broken: Assessing Corporate Security in 2012 to Make a Better 2013
EH-Net Login
Welcome Guest.
Username:
Password:
Remember me
Lost Password?
No account yet?
Register
Who's Online
We have 85 guests and 2 members online
You are here:
Home
Ethical Hacking Discussions and Related Certifications
Malware
Wannabe "Ethical Hacker" - Trying to learn privilege escalations
EH-Net
May 18, 2013, 10:51:21 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Go back to The Ethical Hacker Network Online Magazine
Home Page
Home
Help
Calendar
Login
Register
EH-Net
>
Ethical Hacking Discussions and Related Certifications
>
Malware
(Moderator:
don
) >
Wannabe "Ethical Hacker" - Trying to learn privilege escalations
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Wannabe "Ethical Hacker" - Trying to learn privilege escalations (Read 9555 times)
0 Members and 1 Guest are viewing this topic.
nokaoi77
Newbie
Offline
Posts: 5
Wannabe "Ethical Hacker" - Trying to learn privilege escalations
«
on:
February 20, 2010, 10:54:20 AM »
good morning all,
total newbie here...
unfortunately for me...i am both, new to linux (my apologies, 20/yrs windows, 0 linux) LOL and, new to exploiting systems. and on top of these obstacles, i am doubling my frustration by pursuing related credentials of CEH (Certified Ethical Hacker) and CPT (Certified Penetration Tester), so as i am sure you can guess, i am feeling insane and well out of my comfort zone/league.
down to it!
i am searching for help - forums where i can communicate my needs and receive help/guidance.
heck, i would love to pay for a couple hours worth of PROFESSIONAL (well, better than me anyhow) training...
i just cant seem to find such resources.
anyhow, so, my situation...
i have a VM for my lab testing,
friends chose RedHat7
it using Kernel 2.4.20
goal is to acquire the SHADOW/PASSWD files and crack them, specifically user of root
i am as far as 1 user account in, i can log into the gui of RedHat, see directories (cept those without permissions)
need help with the following;
1. IMMEDIATE HELP/OBJECTIVE
- finding a local privilege escalation to root exploit (i.e. do_brk, crash, krnl, ptrace, etc.)
- compiling, installing, running the code
- gaining root access and i can take it from there (i hope)
2. NEXT GOAL
something else i want to learn, is SSH Brute Force (hydra, brutessh, etc.)
i use them, but they are NOT working....i think because the initial attempt is prompting for accepting the SSH key, but the Brute apps are not accepting it - i think!
LAST OBJECTIVE
finally, using metasploit to remotely compromise the system (what exploit and how to use it properly (payloads, configs, etc.
well, these are ALL goals of the training i want to pursue over this weekend and next....
can someone, anyone point me in the right direction!
provide assistance, recommendations/suggestions/lists of some resources that can help, propose where i can find the help to achieve those objectives above?
thanks for your time and efforts - WELL IN ADVANCE!!!
kindest regards,
nokaoi77
Logged
zeroflaw
Full Member
Offline
Posts: 208
Re: Wannabe "Ethical Hacker" - Trying to learn privilege escalations
«
Reply #1 on:
February 20, 2010, 11:22:50 AM »
Welcome. Well I think your goals are quite unrealistic, especially when you're trying to accomplish them over the weekend. You say you have no experience with Linux, so how can you expect to find exploits so fast unless you know what you're doing. I would suggest you read some books about Linux, learn to work with the Linux terminal and experiment with the commands. Also try to pick up information about bash scripting and Perl.
ZF
Logged
ZF
chrisj
Hero Member
Offline
Posts: 1163
Re: Wannabe "Ethical Hacker" - Trying to learn privilege escalations
«
Reply #2 on:
February 20, 2010, 11:45:31 AM »
To follow up on what ZeroFlaw has said, you'll need the CLI for the majority of what you want to try and do.
Take a look at chapter 11 of Hacking for Dummies 3rd edition (don't let the name fool you), and skim the Table of Contents and index of Hacking the Next Generation.
If you don't already have one, get an O'Reilly Safari account. You're going to be reading a lot. I know my account has been getting a work out lately.
Since you are using an older version of Redhat, you might be able to do some hunting on Google and other search engines for exploits against it.
Lastly Brute forcing takes time. Lots and lots of time.
Logged
OSWP, Sec+
nokaoi77
Newbie
Offline
Posts: 5
Re: Wannabe "Ethical Hacker" - Trying to learn privilege escalations
«
Reply #3 on:
February 20, 2010, 01:46:59 PM »
ZeroFlaw and chrisj,
appreciate the replies...thanks for the postings!
i will look into the Hacking for Dummies material, didnt realize it was available.
so you know, i did buy the nmap and snort books already.
but there not geared towards local exploits, or root priv escalation which is my current objective.
but also, would you know where i can get assistance for those i have listed?
something more proactive, where communication (or perhaps hand holding) is available?
some place where i can obtain interactive, tell me what the heck to do assistance?
i am not oppose to paying for help, its just learning and not harmful or illegal actions i am pursuing, as i presume most intentions are on this site.
books are limited, they say what SHOULD happen, but when that doesnt, its those periods i need the extra push (and not off a cliff either) LOL
well, to elaborate;
as mentioned, while certainly not new to computers/windows, linux is indeed new.
i've worked with /etc/shadow and /etc/passwd files already in earlier labs.
i am familiar with jtr, cain n abel, etc.
taking hashes and running them to jtr, i have 3-4 passwords already.
i have already, successfully completed other parts of my labs, using Priviledge Exploits (but they worked and were without incident-on CentOS, different kernel - worked like a charm).
however, i can also correlate parts of windows to linux, in that CLI/Terminal similarities exist.
on my lab, i DO HAVE TERMINAL access, except to those important directories/files limited by permissions, hence the Privilege Escalation help i need.
yes, i know brutessh "can" take a long time;
however, when you know users/passwords on a system (i know 2-3 accounts and their passwords, as i can login via the OS Gui just fine), when i manually enter the passwords into password dictionary text files, use the app, point to that dictionary and things just dont work as expected, thats what i am trying to overcome.
why when i issue ./brutessh.py does it begin properly, go thru the list and literally just PASS UP the actual password i know it really is - why doesnt it stop and tell me, hey, heres the password like i believe/understand it suppose to.
in this example, when i manually SSH to the box, it immediately prompts for accepting the encryption key for the SSH session.
i dont think these BF SSH apps are seeing that, nor accepting it, either etc.
on the code issues...
i have what i feel is the code mentioned earlier...like an do_brk.c, ptrace_attach.c files and others.
but, when attempting compilations, i get numerous problems/errors.
0 memory not available
include missing
etc.
its these types of obstacles i need further direction on.
determining why exactly the SSH is failing and how to overcome it
i.e. is there somwhere in the app that i should be telling it
if prompted for a key, say yes!
determining why the 0 memory msg/etc. shows, how to overcome/resolve
is my compling method wrong, is something missing, is the code not working, is the OS patched against it, etc, etc, etc.
this is where i am heading....seeking more direct, hand holding input/guidance.
well...guess i better start my day finally....
thanks again and good luck to you both!
Logged
zeroflaw
Full Member
Offline
Posts: 208
Re: Wannabe "Ethical Hacker" - Trying to learn privilege escalations
«
Reply #4 on:
February 20, 2010, 02:40:55 PM »
Well I'm no Linux hero or anything so I'm not sure if I can really help you. As for privilege escalation, I would probably start looking for programs or services that run under root privileges, and see if you can find exploits on the internet.
I recommend buying the book "Hacking The Art of Explotation", to get a deeper understanding of how exploitation works and how to develop exploits. It explains everything from programming to writing your own exploits and shellcode.
About the compiling part, well do you have any C programming experience? C source files are mostly compiled using the GCC compiler. It's usually as simple as;
gcc -o outputfile sourcefile
So in your case that would be;
gcc -o ptrace_attach ptrace_attach.c
Then run it with;
./ptrace_attach
My SHH knowledge is rusty and limited, so I'm probably not the right person to help you with that.
ZF
Logged
ZF
chrisj
Hero Member
Offline
Posts: 1163
Re: Wannabe "Ethical Hacker" - Trying to learn privilege escalations
«
Reply #5 on:
February 20, 2010, 03:21:06 PM »
Since we're playing under the idea that this is all ethical training (group of friends playing capture the box or something on a private lab)
if you want to pay for a class, while not exactly hand holding, the first one that comes to mind is PWB / OSCP.
It'll be a lot thrown at you and take longer than the time you have.
if you have other user accounts already... Look into sudo.
Last week I was working with JTR and kept getting failures. I spent a couple of hours looking into why. It didn't work the way the book said, but I learned a lot out side of the book trying to figure out why it wasn't working.
Logged
OSWP, Sec+
nokaoi77
Newbie
Offline
Posts: 5
Re: Wannabe "Ethical Hacker" - Trying to learn privilege escalations
«
Reply #6 on:
February 20, 2010, 04:13:56 PM »
okay, thanks will run with those for now...
i believe i was already doing some of that, but will retry when i return home tonight, then post the results to get your interpretations.
yes, i am using the gcc commands, also tried g++, results are same/similar when i run against code i have.
thanks again, appreciate the input!
Logged
nokaoi77
Newbie
Offline
Posts: 5
Re: Wannabe "Ethical Hacker" - Trying to learn privilege escalations
«
Reply #7 on:
February 20, 2010, 06:13:25 PM »
ok, havent left yet =)
doing so now, but i was able to run it and copy/paste my results for evaluation. below are summary samples of problems, but i will attach full .TXT file for review.
can you tell what, if anything, i am doing wrong???
or, can you point me to where i might get the help to get these up/working?
i sure as heck cannot figure it out =(
well, thanks though!
================
root@bt:/usr/include# ls | grep crash
crash.c
root@bt:/usr/include# ls | grep do_
do_brk.c
root@bt:/usr/include# ls | grep krn
krnl.l.c
root@bt:/usr/include# ls | grep ptra
ptrace_attach.c
*************************************************************************
PROBLEM 1
root@bt:/usr/include# gcc -o crash crash.c
crash.c: In function 'Handler':
crash.c:8: error: memory input 0 is not directly addressable
crash.c:10: error: memory input 0 is not directly addressable
*************************************************************************
*************************************************************************
PROBLEM 2
root@bt:/usr/include# gcc -o do_brk do_brk.c
do_brk.c:1: error: expected identifier or '(' before '/' token
In file included from /usr/include/stdio.h:75,
from do_brk.c:3:
/usr/include/libio.h:332: error: expected specifier-qualifier-list before 'size_t'
/usr/include/libio.h:364: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/libio.h:373: error: expected declaration specifiers or '...' before 'size_t'
*************************************************************************
*************************************************************************
PROBLEM 3
root@bt:/usr/include# gcc -o krnl krnl.l.c
krnl.l.c: In function 'TakeDown':
krnl.l.c:54: error: memory input 0 is not directly addressable
*************************************************************************
*************************************************************************
PROBLEM 4
root@bt:/usr/include# gcc -o ptrace ptrace_attach.c
ptrace_attach.c:2: error: expected identifier or '(' before '--' token
ptrace_attach.c:8:24: error: linux/user.h: No such file or directory
ptrace_attach.c: In function 'main':
ptrace_attach.c:25: error: storage size of 'regs' isn't known
*************************************************************************
root@bt:/usr/include#
Logged
nokaoi77
Newbie
Offline
Posts: 5
Re: Wannabe "Ethical Hacker" - Trying to learn privilege escalations
«
Reply #8 on:
February 20, 2010, 06:18:51 PM »
oh, also...this stuff below...
it worked perfectly, just like the video and code downloaded!
hence my comparison, why i cannot get this stuff to work, yet this first attempt onto another VM with CentOS, it worked like a charm
How to LOCAL ROOT EXPLOIT video
http://www.youtube.com/watch?v=ShoAOdx0K7I
and, i found the code/tar via Google in about 5min, placed onto system, ran it and just like the video - it worked =)
guess all things in life cannot be that easy
LOL
take care!
Logged
chrisj
Hero Member
Offline
Posts: 1163
Re: Wannabe "Ethical Hacker" - Trying to learn privilege escalations
«
Reply #9 on:
February 20, 2010, 08:56:00 PM »
Quote
crash.c: In function 'Handler':
crash.c:8: error: memory input 0 is not directly addressable
crash.c:10: error: memory input 0 is not directly addressable
Those are error messages. the In Function tells you what part of the code, the ones with numbers are the line numbers to look at.
As to why it works on CentOS but not the older Redhat, may have to deal with what libraries and other packages are installed on each box.
Logged
OSWP, Sec+
tjbigshot9919
Newbie
Offline
Posts: 2
Re: Wannabe "Ethical Hacker" - Trying to learn privilege escalations
«
Reply #10 on:
March 09, 2010, 02:54:52 PM »
yeah, same here im new at hacking but a friend of mine suggested the book series "hacking exposed". its VERY good. tons of info on pretty much anything.
Logged
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
EH-Net
-----------------------------
=> Calendar Of Events
===> ChicagoCon 2007
===> ChicagoCon 2008s
===> ChicagoCon 2008f
===> ChicagoCon 2009s
=> Ethical Hacktivism
=> News Items and General Discussion About EH-Net
===> Greetings
=> Special Events
-----------------------------
Ethical Hacking Discussions and Related Certifications
-----------------------------
=> General Certification
===> Networking
===> OS
===> Security
=> Compliance, Regulations & Standards
=> Control Systems
=> Cyber Warfare
=> Forensics
===> CCE / MCCE - (Master) Certified Computer Examiner
===> CHFI - Computer Hacking Forensic Investigator
===> EnCE - EnCase® Certified Examiner
===> GCFA - GIAC Certified Forensics Analyst
=> Hardware
=> Incident Response
===> CSIH - Computer Security Incident Handler
===> GCIH - GIAC Certified Incident Handler
=> Malware
===> Advisories
=> Mobile
=> Network Pen Testing
===> CEH - Certified Ethical Hacker
===> CPTC - Certified Penetration Testing Consultant
===> CPTE - Certified Penetration Testing Engineer
===> CSTA - Certified Security Testing Associate
===> eCPPT - eLearnSecurity Certified Professional Penetration Tester
===> ECSA - EC-Council Certified Security Analyst
===> GPEN - GIAC Certified Penetration Tester
===> OSCP - Offensive Security Certified Professional
=> Physical Security
=> Programming
=> Social Engineering
=> Web Applications
=> Wireless
===> CWNP Certs
===> GAWN - GIAC Assessing Wireless Networks
===> OSWP - Offensive Security Wireless Professional
=> Other
-----------------------------
Columns
-----------------------------
=> Editor-In-Chief
=> Andress
=> Gates
=> Haddix
=> Hadnagy
=> Heffner
=> Hoffman
=> Linn
=> RichM
=> Murray
=> J. Peltier
=> Weidman
=> Wilson
-----------------------------
Features
-----------------------------
=> /root
=> Book Reviews
=> Opinions
=> Skillz
===> Examples
===> May 06 - Star Hacks, Episode V: The Empire Hacks Back
===> July 06 - Hack Bill!
===> Sept 06 - Netcat in the Hat
===> Nov 06 - Hitch-Hackers Guide to the Galaxy
===> Dec 06 - A Christmas (Hacking) Story
===> Feb 07 - Charlottes Web Site
===> April 07 - Microsoft Office Space
===> June 07 - Serenity Hack
===> Oct 07 - Worst. Ethical. Hacker. Challenge. Ever.
===> Dec 07 - Frosty the Snow Crash
===> March 2008 - It Happened One Friday
===> Oct 2008 - Scooby Doo and the Crypto Caper
===> Dec 08 - Santa Claus Is Hacking to Town
===> Feb 2009 - Brady Bunch Boondoggle
===> July 2009 - Prison Break
===> October 2009 - SSHliders
===> December 2009 - Miracle on Thirty-Hack Street
===> December 2010 - The Nightmare Before Charlie Browns Christmas
-----------------------------
Resources
-----------------------------
=> Career Central
===> Looking For Work
===> Looking To Hire
=> Links to cool sites.
=> Mass Media
=> News from the Outside World
=> Tools
=> Tutorials
===> Tutorial Requests
Loading...
Exclusive Deal
SANSFIRE 2013
June 15 - 22
5% Off
w/ Code
:
EHN_5
SANS Deals 4 EH-Netters
5% OFF
Any
SANS Course
in Any Format!
Coupon Code:
EHN_5
Including
SANS Rocky Mountain 2013
&
SANS Boston 2013
Polls
Compared to this year, 2013 will be:
Great!
Better.
About the same.
Little worse.
FUBAR!
Recent Forum Topics
General Certification
: CPT Practical Submission
(0) by
z28power4u
OSCP - Offensive Security Certified Professional
: Class Scheduled 6/8 - Linux n00b
(5) by
MrTuxracer
Career Central
: Starter cert?
(0) by
Alert
Ethical Hacktivism
: lulzsec in it for the money
(7) by
Georgydfea
News Items and General Discussion About EH-Net
: [Article]-Holiday 2012 Free Giveaway Sponsor - Rapid7
(20) by
Georgydfea
News Items and General Discussion About EH-Net
: Наконец то ра
(4) by
Georgydfea
Web Applications
: Nessus and Nikto
(4) by
Seen
Tutorials
: Need guidance
(7) by
impelse
Malware
: EICAR?
(2) by
SephStorm
Network Pen Testing
: Cracking salted MD5 hash
(4) by
n37sh@rk
CEH - Certified Ethical Hacker
: Passed my C|EH
(3) by
n37sh@rk
Mass Media
: EC-council hacked, irony at his best?
(0) by
j0rDy
Web Applications
: SQL Injection into an INSERT statement.
(6) by
eyenit0
Network Pen Testing
: Solution for sipXtapi INVITE Message CSeq Field Header Remote Overflow
(1) by
m0wgli
Web Applications
: dns
(2) by
H1t M0nk3y
Other
: BSides Boston
(0) by
3xban
Career Central
: InfoSec in Central, FL
(2) by
tturner
Web Applications
: Web vulnerability scanner
(4) by
H1t M0nk3y
EH-Net News Feeds
Latest Additions
Privacy Notice
for TDCC & All Properties
© 2013 The Ethical Hacker Network
Joomla!
is Free Software released under the GNU/GPL License.