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 47 guests and 3 members online
You are here:
Home
Ethical Hacking Discussions and Related Certifications
Network Pen Testing
Limited shell
EH-Net
May 22, 2013, 06:35:08 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
>
Network Pen Testing
(Moderator:
don
) >
Limited shell
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Limited shell (Read 3073 times)
0 Members and 1 Guest are viewing this topic.
H1t M0nk3y
Hero Member
Offline
Posts: 864
Limited shell
«
on:
January 16, 2013, 08:45:05 AM »
Ok, here's another problem I have had for way too long now and I want to fix.
Here's the scenario: I have got a limited shell on a server in a lab through a web application vulnerability.
By "limited shell", I mean:
- The shell doesn't give me any output on the screen and I cannot output results of commands in a file
- I can change directory and list files (using a second ASP shell), but that's about it.
- I am able to ftp files/modify files into the web root directory (for example, I have uploaded nc.exe in C:\inetpub\wwwroot)
So for example:
C:\Windows\system32>cd ../.. (works)
C:\>cd inetpub\wwwroot (works)
C:\inetpub\wwwroot> dir (doesn't display anything)
C:\inetpub\wwwroot> dir > files.txt (doesn't create a file)
C:\inetpub\wwwroot> nc.exe -lvp 4444 (doesn't work)
C:\inetpub\wwwroot> nc.exe -v 192.168.1.20 4444 (doesn't work either)
I have tried 5 or 6 different ASP shells, but couldn't get much more out of it.
So what approach should I take at this point? Write my own ASP shell code? Focus on trying to get a full shell (for example, using netcat somehow)? Maybe priv escalation (I don't think so at this point, but I could be wrong)
I really just need a direction so I can continue working on a solution...
Thanks
Logged
OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
ziggy_567
Sr. Member
Offline
Posts: 361
Re: Limited shell
«
Reply #1 on:
January 16, 2013, 08:56:01 AM »
The link below is Linux specific, but there's quite a bit that could be adapted to Windows.
http://pen-testing.sans.org/blog/pen-testing/2012/06/06/escaping-restricted-linux-shells
Also, maybe something in there will click for you and give you some further avenues to explore.
Good luck!
Logged
--
Ziggy
eCPPT - GSEC - GCIH - GCUX - RHCE - SCSecA - Security+ - Network+
Dark_Knight
Sr. Member
Offline
Posts: 292
Re: Limited shell
«
Reply #2 on:
January 16, 2013, 09:26:00 AM »
Quote from: H1t M0nk3y on January 16, 2013, 08:45:05 AM
Ok, here's another problem I have had for way too long now and I want to fix.
Here's the scenario: I have got a limited shell on a server in a lab through a web application vulnerability.
By "limited shell", I mean:
- The shell doesn't give me any output on the screen and I cannot output results of commands in a file
- I can change directory and list files (using a second ASP shell), but that's about it.
- I am able to ftp files/modify files into the web root directory (for example, I have uploaded nc.exe in C:\inetpub\wwwroot)
So for example:
C:\Windows\system32>cd ../.. (works)
C:\>cd inetpub\wwwroot (works)
C:\inetpub\wwwroot> dir (doesn't display anything)
C:\inetpub\wwwroot> dir > files.txt (doesn't create a file)
C:\inetpub\wwwroot> nc.exe -lvp 4444 (doesn't work)
C:\inetpub\wwwroot> nc.exe -v 192.168.1.20 4444 (doesn't work either)
I have tried 5 or 6 different ASP shells, but couldn't get much more out of it.
So what approach should I take at this point? Write my own ASP shell code? Focus on trying to get a full shell (for example, using netcat somehow)? Maybe priv escalation (I don't think so at this point, but I could be wrong)
I really just need a direction so I can continue working on a solution...
Thanks
Are you able to run "net" commands for "net user" etc?
Logged
CEH, OSCP, GPEN, GWAPT, GCIA
http://sector876.blogspot.com
H1t M0nk3y
Hero Member
Offline
Posts: 864
Re: Limited shell
«
Reply #3 on:
January 16, 2013, 09:31:53 AM »
Thanks ziggy_567, I will be reading this tonight!!
Quote
Are you able to run "net" commands for "net user" etc?
No, it doesn't work either...
The IIS server is run with a pretty limited user...
Logged
OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
ajohnson
Recruiters
Hero Member
Offline
Posts: 1057
aka dynamik
Re: Limited shell
«
Reply #4 on:
January 16, 2013, 10:20:07 AM »
What shells are you trying to use? What OS and version of IIS are you using?
I've encountered instances where i can blindly execute commands, but I can't think of a time where I was using a web shell and wasn't able to receive output for non-privileged commands.
Here's another collection of shells you might want to try:
http://laudanum.inguardians.com/
I'm pretty sure there is at least one ASP-based shell in there.
Logged
WIP: GCFA |
www.infosiege.net
| @infosiege
The day you stop learning is the day you start becoming obsolete.
H1t M0nk3y
Hero Member
Offline
Posts: 864
Re: Limited shell
«
Reply #5 on:
January 16, 2013, 11:57:16 AM »
Quote
What shells are you trying to use? What OS and version of IIS are you using?
Microsoft Windows 2000 SP4
Microsoft IIS httpd 5.1
Using ASPshell and zephir4 (tried 3 or 4 others that I don't remember)
But I am not really looking for help to debug this problem. I am more looking at a methodology or links with tricks I could try.
I have already tried something like 25 differents tricks (not all listed here, obviously), but I would like to learn a few other ones.
I might write my own ASP shell code tonight or modify an existing one...
Logged
OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
ajohnson
Recruiters
Hero Member
Offline
Posts: 1057
aka dynamik
Re: Limited shell
«
Reply #6 on:
January 16, 2013, 10:34:44 PM »
Methodology-wise, I'd skip the fancy shells and just see if a basic script works. Something like executing the the value of a GET variable called cmd and output it to the screen. The web service account should at least be about to output a directory listing. If not, there may be something else quirky going on.
Logged
WIP: GCFA |
www.infosiege.net
| @infosiege
The day you stop learning is the day you start becoming obsolete.
ajohnson
Recruiters
Hero Member
Offline
Posts: 1057
aka dynamik
Re: Limited shell
«
Reply #7 on:
January 17, 2013, 09:20:43 AM »
Also, remember that you can use msfpayload/msfencode or msfvenom to create asp files that contain Meterpreter, reverse shells, etc.
Logged
WIP: GCFA |
www.infosiege.net
| @infosiege
The day you stop learning is the day you start becoming obsolete.
H1t M0nk3y
Hero Member
Offline
Posts: 864
Re: Limited shell
«
Reply #8 on:
January 17, 2013, 10:16:43 AM »
I didn't know that.
I will play with this later today.
Thanks ajohnson
Logged
OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
ajohnson
Recruiters
Hero Member
Offline
Posts: 1057
aka dynamik
Re: Limited shell
«
Reply #9 on:
January 17, 2013, 10:33:07 AM »
This tutorial uses WebDAV as the delivery mechanism, but shows how to create the asp file, which works regardless of how you get it up to the web server:
http://carnal0wnage.attackresearch.com/2010/05/more-with-metasploit-and-webdav.html
Logged
WIP: GCFA |
www.infosiege.net
| @infosiege
The day you stop learning is the day you start becoming obsolete.
H1t M0nk3y
Hero Member
Offline
Posts: 864
Re: Limited shell
«
Reply #10 on:
January 17, 2013, 12:12:10 PM »
I appreciate it ajohnson. Thanks
Logged
OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
H1t M0nk3y
Hero Member
Offline
Posts: 864
Re: Limited shell
«
Reply #11 on:
January 18, 2013, 11:09:43 AM »
As an update, the Meterpreter as an ASP payload did the trick.
Other useful information related to this subject:
http://www.ethicalhacker.net/component/option,com_smf/Itemid,54/topic,9169.0/
http://www.ethicalhacker.net/component/option,com_smf/Itemid,54/topic,5966.msg31666/#msg31666
http://www.room362.com/blog/2012/8/25/post-exploitation-command-lists-request-to-edit.html
Thanks again!
Logged
OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
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
News Items and General Discussion About EH-Net
: This is meant to give professional landscapers Nike Blazer Uk
(0) by
Loyatoitada
ChicagoCon 2007
: Just as with A Better World Cheap Air Max Sale
(0) by
Loyatoitada
ChicagoCon 2007
: which along with its raise Louis Vuitton
(0) by
Loyatoitada
News Items and General Discussion About EH-Net
: Sunday Super Bowl Champion Brendon Ayanbadejo Nike Blazer Uk
(0) by
Loyatoitada
News Items and General Discussion About EH-Net
: It Louis Vuitton Pas Cher
(0) by
Loyatoitada
ChicagoCon 2007
: s go over the three places most inventory accumulates Nike Blazers Sale
(0) by
Loyatoitada
News Items and General Discussion About EH-Net
: Or you could try to partner with them or someone else Cheap Air Max Sale
(0) by
Loyatoitada
News from the Outside World
: Google Dropping Windows For Internal Use
(10) by
Loyatoitada
Special Events
: [Article]-Video: Deep Dive into Red Teaming with the Metasploit Framework
(4) by
BeecyGorror
Security
: christian louboutin cheap artic5843
(0) by
fufig388
Special Events
: [Article]-Survey of Hacking Movies: Framing the Debate on the Gateway Drug into the H...
(14) by
BeecyGorror
/root
: [Article]-Course Review: CPT by InfoSec Institute
(1) by
BeecyGorror
Ethical Hacktivism
: Paranoid parents messing with routers
(21) by
BeecyGorror
Compliance, Regulations & Standards
: SABSA - Sherwood Applied Business Security Architecture
(1) by
BeecyGorror
News Items and General Discussion About EH-Net
: What does EthicalHacker.net bring you?
(12) by
BeecyGorror
News Items and General Discussion About EH-Net
: Burberry UK,2013 Burberry Safety-valve Online Available in London
(13) by
BeecyGorror
News Items and General Discussion About EH-Net
: louis vuitton handbags mhf
(0) by
Vamscoora
Calendar Of Events
: ChicagoCon 2008f
(3) by
BeecyGorror
News Items and General Discussion About EH-Net
: "Free Monthly Giveaways" - Details
(22) by
BeecyGorror
ChicagoCon 2007
: s going to be critical to have universal identity in order for these systems to talk ...
(0) by
Loyatoitada
Malware
: New zero-day exploit for Internet Explorer 7, 8, and 9 on Windows XP, Vista & 7
(13) by
BeecyGorror
Special Events
: [Article]-Webcast: Deep Dive into Red Teaming with the Metasploit Framework
(19) by
BeecyGorror
News Items and General Discussion About EH-Net
: but it needs more help: they Sac Louis Vuitton
(0) by
Loyatoitada
Greetings
: but the desperate effort that comes from being hopeful Nike Blazers Uk
(0) by
Loyatoitada
ChicagoCon 2007
: waterfall Cheap Air Max Sale
(0) by
Loyatoitada
News Items and General Discussion About EH-Net
: The advent of the web happened slowly Nike Blazer Uk
(0) by
Loyatoitada
Network Pen Testing
: AIX Vulnerability Assessments
(2) by
ras76
Tutorials
: Need guidance
(9) by
hanyhasan
Programming
: Finished Python Course in Codecademy now what?
(15) by
hanyhasan
Network Pen Testing
: Ruby on Rails Vulnerabilities / Attacks in BackTrack 5 r3
(0) by
SUdoctstudent
Network Pen Testing
: De-ICE 1.140 released!
(2) by
superkojiman
General Certification
: CPT Practical Submission
(1) by
UNIX
OSCP - Offensive Security Certified Professional
: Failed my first attempt at the OSCP exam
(94) by
azmatt
Tools
: Social-Engineer Toolkit (SET) Version 5.0 “The Wild West” Released
(2) by
m0wgli
Malware
: EICAR?
(3) by
UKSecurityGuy
Advisories
: HTB23154: Multiple Vulnerabilities in Exponent CMS
(0) by
AndyP
Advisories
: HTB23153: Multiple Vulnerabilities in Jojo CMS
(0) by
AndyP
Advisories
: HTB23151: Cross-Site Request Forgery (CSRF) in UMI.CMS
(0) by
AndyP
OSCP - Offensive Security Certified Professional
: Class Scheduled 6/8 - Linux n00b
(7) by
Taemyks
OSCP - Offensive Security Certified Professional
: OSCP exam scheduled
(6) by
gbhat
Incident Response
: LinkedIn Forensics
(0) by
AFENTIS_Forensics
General Certification
: Red Team/Blue Team
(1) by
ajohnson
Career Central
: Starter cert?
(3) by
Grendel
Network Pen Testing
: Beginner Ethical Hacker
(1) by
m0wgli
Web Applications
: Nessus and Nikto
(4) by
Seen
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
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.