[Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-05 Thread laurent gaffie
http://resources.infosecinstitute.com/php-build-your-own-mini-port-scanner/ Finding the vulnerability in this code is left as an exercise to the reader. PS: "*Your comment will be awaiting moderation forever."* ___ Full-Disclosure - We believe in it. Ch

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-05 Thread Fayyaz Ali
$host = $_POST['ip']; system("ping $host"); On Wed, Mar 6, 2013 at 5:46 AM, laurent gaffie wrote: > http://resources.infosecinstitute.com/php-build-your-own-mini-port-scanner/ > > Finding the vulnerability in this code is left as an exercise to the > reader. > > PS: "*Your comment will be awaiti

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-05 Thread Harry Hoffman
lolz, that's great! I guess it shouldn't be surprising, he's a undergrad. But even most grad students make these sorts of mistakes... academicware ;-) Cheers, Harry On 03/05/2013 08:46 PM, laurent gaffie wrote: > http://resources.infosecinstitute.com/php-build-your-own-mini-port-scanner/ > > Fin

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-05 Thread laurent gaffie
Question is not about someone making a mistake, everyone make mistakes one day or another. Question is about not even doing Q.A on a corporate blog post (contribution or not) where you sells training @5k for B.S certs. 2013/3/5 Harry Hoffman > lolz, that's great! I guess it shouldn't be surprisi

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-06 Thread Źmicier Januszkiewicz
Dear list, Well, I suppose this had to be a proof-of-concept piece of code to demonstrate how port scanning can be done in PHP, not a production-grade software. Adding input sanitization would increase the code size by a lot and obscure the concept somewhat (not that there is much to be said anout

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-06 Thread Alexandre Teixeira
How is SANS related to that? Subject mismatch? On Wed, Mar 6, 2013 at 3:14 AM, laurent gaffie wrote: > Question is not about someone making a mistake, everyone make mistakes one > day or another. Question is about not even doing Q.A on a corporate blog > post (contribution or not) where you sell

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-06 Thread Benji
Actually, adding input sanitisation really wouldnt increase the code size that much. Are you just incompetent? On Wed, Mar 6, 2013 at 7:46 AM, Źmicier Januszkiewicz wrote: > Dear list, > > Well, I suppose this had to be a proof-of-concept piece of code to > demonstrate how port scanning can be

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-06 Thread Benji
Replace you with they if you want. ___ Full-Disclosure - We believe in it. Charter: http://lists.grok.org.uk/full-disclosure-charter.html Hosted and sponsored by Secunia - http://secunia.com/

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-06 Thread Ulisses Montenegro
Not including proper input validation and error handling in code samples is one of the most common and harmful practices in the software development industry -- doing it is not "optional" or "advanced", it is mandatory unless you want to be pwned. Developers need to start doing things properly fro

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-06 Thread Źmicier Januszkiewicz
Dear Benji, I think I am, good sir. Never said I know it all and am competent. But thank you for sharing your wisdom with me anyway! With kind regards, Z. 2013/3/6 Benji > Actually, adding input sanitisation really wouldnt increase the code size > that much. Are you just incompetent? > > > On

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-06 Thread Dan Ballance
+1 On 6 Mar 2013 10:41, "Ulisses Montenegro" wrote: > Not including proper input validation and error handling in code samples > is one of the most common and harmful practices in the software development > industry -- doing it is not "optional" or "advanced", it is mandatory > unless you want to

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-06 Thread Christian Sciberras
The article actually recommends looking for information from www.w3schools.com ?! Here's a few other obviously missing things: - script requires input but does not check for it (very bad PHP practice) - what the hell is with that code? Ever heard about indentation? - there

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-06 Thread Ulisses Montenegro
Christian If you're reading my email as "it's the developers' fault", then you got it wrong -- I've been a developer for most of my life. And while things have gotten better in the last years, there are still tons of "build your blog 15 minutes" or "develop a twiiter clone in 2h" tutorials/adverti

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-06 Thread Christian Sciberras
Ulisses, No, I'm blaming developers that are not in the field of security for this mess. Chris. On Wed, Mar 6, 2013 at 1:10 PM, Ulisses Montenegro < ulisses.montene...@gmail.com> wrote: > Christian > > If you're reading my email as "it's the developers' fault", then you got > it wrong -- I've

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-07 Thread Andrew King
Has anyone considered that loads of stuff is shipped bugged? I mean it's not like they hosted it on their site executable. It's also not like we're talking about vsftpd where it's installed for a legitimate purpose on millions if not billions of PCs. The million eyeball test and trolling a compa

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-07 Thread Christian Sciberras
Andrew, You realize this guy is trying to advise people through a tutorial? It's not like we're talking about average Joe shipping buggy software... people *teaching bad practices,* especially in this field should be shot dead before they do any more damage. You just can't learn how to code by t

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-07 Thread adam
The original page has been deleted? On Thu, Mar 7, 2013 at 7:50 PM, Christian Sciberras wrote: > Andrew, > > > You realize this guy is trying to advise people through a tutorial? > It's not like we're talking about average Joe shipping buggy software... > people *teaching bad practices,* especial

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-07 Thread adam
Screenshot for anyone who might have missed it (before cache is removed): http://img842.imageshack.us/img842/7351/sansphpportscannerfdpng.png On Thu, Mar 7, 2013 at 7:53 PM, adam wrote: > The original page has been deleted? > > > On Thu, Mar 7, 2013 at 7:50 PM, Christian Sciberras wrote: > >> A

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-07 Thread Nick FitzGerald
adam replied to himself: > > The original page has been deleted? > > Screenshot for anyone who might have missed it (before cache is removed): > > http://img842.imageshack.us/img842/7351/sansphpportscannerfdpng.png Or, if you want actual editable content, you could try this thing called the Goo

Re: [Full-disclosure] SANS PHP Port Scanner Remote Code Execution

2013-03-07 Thread Stefan Jon Silverman
Title: Message Nick:     That gets you to the fail page where (sometimes) you are offered the option to look at the cached copy     Here is the cached copy --> http://webcache.googleusercontent.com/sear