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 31 guests online
You are here:
Home
Ethical Hacking Discussions and Related Certifications
Network Pen Testing
using code from Metasploit
EH-Net
May 25, 2013, 02:44:22 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
) >
using code from Metasploit
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: using code from Metasploit (Read 3021 times)
0 Members and 1 Guest are viewing this topic.
wlandymore
Newbie
Offline
Posts: 34
using code from Metasploit
«
on:
March 19, 2012, 02:03:26 PM »
I'm just trying to use the code that I've got from Metasploit and wondering how I compile it basically. I'm using the /linux/x86/chmod payload and then I set the options and then entered 'generate'. It spits back the code but do I then take this and make my own file to compile or can it be run from within the console somehow.
Sorry, new to Metasploit.
Logged
hayabusa
Hero Member
Offline
Posts: 1633
Re: using code from Metasploit
«
Reply #1 on:
March 19, 2012, 03:26:52 PM »
I'm assuming you're referring to having generated shellcode, is that correct? If so, that is shellcode to be used with an existing exploit, by inserting your code into it, in place of other, existing shellcode, in the POC or example exploit.
Conversely, in some cases, you can also have it generate executables for a given platform. I don't have my metasploit handy, to see what you're working with, to give more detail, right the moment. But basically, you'd need to either do as I mentioned, above, or pick a different exploit, that generates a working executable, and use that payload code with it.
«
Last Edit: March 19, 2012, 03:28:59 PM by hayabusa
»
Logged
~ hayabusa ~
"All men can see these tactics whereby I conquer, but what none can see is the strategy out of which victory is evolved." - Sun Tzu, 'The Art of War'
OSCE, OSCP , GPEN, C|EH
hayabusa
Hero Member
Offline
Posts: 1633
Re: using code from Metasploit
«
Reply #2 on:
March 19, 2012, 03:30:44 PM »
See, for instance, the notes on 'Custom Executables', at:
http://www.scriptjunkie.us/2011/08/custom-payloads-in-metasploit-4/
Specifically, the link, therein, to:
http://www.scriptjunkie.us/2011/04/why-encoding-does-not-matter-and-how-metasploit-generates-exes/
<Edit again, sorry>
Note - I know this talks of exe's, but the same concept applies to unix-based executables, etc. You just need the proper arguments/methods. Here is an example of Linux executable, from Metasploit Unleashed:
http://www.offensive-security.com/metasploit-unleashed/Binary_Linux_Trojan
«
Last Edit: March 19, 2012, 03:36:08 PM by hayabusa
»
Logged
~ hayabusa ~
"All men can see these tactics whereby I conquer, but what none can see is the strategy out of which victory is evolved." - Sun Tzu, 'The Art of War'
OSCE, OSCP , GPEN, C|EH
wlandymore
Newbie
Offline
Posts: 34
Re: using code from Metasploit
«
Reply #3 on:
March 20, 2012, 10:34:07 AM »
yeah, I generated the shellcode. I put it in in a generic script and then tried to compile it but it failed. However, it may not have been exactly what I needed to make it run. I was trying to use the chmod shellcode but I haven't really done this stuff before so I'm being baptized by fire.
I'll read through all of those and see if I can make sense of it.
Thanks.
Logged
hayabusa
Hero Member
Offline
Posts: 1633
Re: using code from Metasploit
«
Reply #4 on:
March 20, 2012, 12:49:00 PM »
No worries. If you get through those, and are still having trouble, drop me a PM on here, and I'll try to help you figure out your issue.
(But please try to figure it out, first... Makes the learning more valuable to you, as you work through things)
Logged
~ hayabusa ~
"All men can see these tactics whereby I conquer, but what none can see is the strategy out of which victory is evolved." - Sun Tzu, 'The Art of War'
OSCE, OSCP , GPEN, C|EH
wlandymore
Newbie
Offline
Posts: 34
Re: using code from Metasploit
«
Reply #5 on:
March 20, 2012, 01:19:31 PM »
sure...I understand.
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
News Items and General Discussion About EH-Net
: Change is Coming to EH-Net!!
(30) by
don
Tools
: Symbolic Exploit Assistant project is looking for collaborators
(0) by
galapag0
Greetings
: Hi from the UK
(5) by
prats84
GCIH - GIAC Certified Incident Handler
: Passed my GCIH
(9) by
prats84
Network Pen Testing
: Want a challenge? Want a GXPN practice exam?
(0) by
ajohnson
GCIH - GIAC Certified Incident Handler
: GCIH Free Practice test attempt
(1) by
prats84
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.