Subject: cat /dev/curious

From: mulix <[email-masked]>
Date: Mon, 08 May 2000 12:27:36 +0300

(*) Favorite hacking music?
(*) Anyone plans to attend defcon this summer? http://www.defcon.org/
(*) Favorite article from phrack56? Any phrack? http://www.phrack.com/
(*) Favorite open source project to work on?
(*) no comment necessary http://www.ee.ryerson.ca:8080/~elf/hack/
(*) Favorite Knuth volume?
(*) Goedel, Escher, Bach: an Eternal Golden Braid
	- I have read it,
	- I have understood it,
	- I am Hofstadter
(*) Score on the hacker purity test
http://www.armory.com/tests/hacker.html
(*) Favorite search engine?
(*) Is there such a thing as unnecessary knowledge?
(*) How can malloc()/ free() fail with a SIGSEGV? (would appreciate an
answer for this one...)
(*) Favorite work of art? 
(*) Favorite book? Author?
(*) Favorite one liner piece of code?
(*) Favorite comment? ("You are not supposed to understand this...")
(*) What is the meaning of life?
(*) What is a life of meaning?
-- 
mulix

linux/reboot.h: #define LINUX_REBOOT_MAGIC1 0xfee1dead

---

From: [email-masked]
Date: Mon, 8 May 2000 11:52:36 +0300

anyone thinks that whoever confuses hackers with crackers should have broken
msdn cd's pushed into various orfices of his body?

--
Chen Shapira	Web Developer and Linux Activist
The algorithm for finding the longest path in a graph is NP-complete.
For you systems people, that means it's *real slow*.

---

From: mulix <[email-masked]>
Date: Mon, 08 May 2000 12:43:44 +0300

Phrack (I assume that's what you're referring to) (Or maybe is it
defcon) is most assuredly NOT about cracking. Read the articles. 

Explain to me what a cracker could do with the knowledge contained
within "Smashing the Stack for Fun and Profit"
(http://phrack.infonexus.com/search.phtml?view&article=p49-14) and what
a hacker could learn from it. 

As to your question: yes. 

-- 
mulix

---

From: Omer Mussaev <[email-masked]>
Date: Mon, 08 May 2000 11:34:44 +0300

> msdn cd's pushed into various orfices of his body?

No. They should be raped by Godzilla. Then, they should have been taught
OO Cobol.
Then, they must be sold to Oracle.

--
Omer Mussaev    051-308-214   mailto:[email-masked]
systems programmer, Mercury Interactive/RND/Conduct/core

---

From: Omer Mussaev <[email-masked]>
Date: Mon, 08 May 2000 11:39:43 +0300

> (*) What is a life of meaning?

those are not questions I would like to hear here. Sorry - read Jargon,
come
to us, hear us talking. If you will survive the nightmare of talknig to me,

well, you are bold.

---

From: mulix <[email-masked]>
Date: Mon, 08 May 2000 13:35:26 +0300

> mulix wrote:

[snipped]

> come to us, hear us talking. If you will survive the nightmare of talknig to me,

I have read the Jargon. 
I have heard you talking. Or at least read the archives. All of them. 
Why is talking to you a nighttmare? 

> well, you are bold.

So they say.

What questions would you like to hear then?
-- 
mulix

---

From: [email-masked]
Date: Mon, 8 May 2000 12:58:36 +0300

> What questions would you like to hear then?

"I just wrote a scheme machine, can you look at these specs?"

---

From: Moshe Zadka <[email-masked]>
Date: Mon, 8 May 2000 14:27:26 +0300 (IDT)

> "I just wrote a scheme machine, can you look at these specs?"

In the same vain, only reversed, anyone want to give a Forth lecture?
Anyone wants to hear a Haskell lecture?

--
Moshe Zadka <[email-masked]>
http://www.oreilly.com/news/prescod_0300.html
http://www.linux.org.il -- we put the penguin in .com

---

From: Omer Mussaev <[email-masked]>
Date: Mon, 08 May 2000 14:51:51 +0300

> within "Smashing the Stack for Fun and Profit"

get root

> a hacker could learn from it.

that "you can never RTFM too much"

---

From: Muli Ben Yehuda <[email-masked]>
Date: Mon, 8 May 2000 16:49:05 +0300 (EET DST)

> > within "Smashing the Stack for Fun and Profit"

That would be quite hard JUST with the info contained in said article. Our
cracker would have to look for the buffer overflows in software used on
the victims machines, which would probably entail auditing their source
for vulnerabilities, then finding ways to use the gained knowledge
to exploit theses vuln. Including but not limited to writing shell
code, etc. After having gone through all of that, does not our "cracker"
deserve to be called a hacker?

I'm most emphatically not referring to the low life breed known as "script
kiddiez".

> that "you can never RTFM too much"

Which, IMHO, embodies the spirit of hacking. Compare Steven Levy's
excellent book "Hackers" for a 440 page discourse on the various
definitions of hackers. I think the above statement is the lowest common
denominator of what a hacker is.

---

From: [email-masked]
Date: Mon, 8 May 2000 17:28:47 +0300

Well, this thread is getting to be about definitions so let us all share or
definitions of ackers and crackers and get it over with.

Cracker - a person who breaks computer security

Hacker - a person who writes cool code or appreciates coolness (hack value) in
code.

Note that technically the two are not mutually exclusive, but I find that most
real hackers find most computer breaking activity either boring or
distastefull, unless they have a really good practical reason to.

anyway this list is still young and has no established guidelines, but I think
everyone will agree with me that this isn't the place to discuss cracking
activities.

---

From: "Nadav Har'El" <[email-masked]>
Date: Mon, 8 May 2000 19:58:53 +0300

On Mon, May 08, 2000, [email-masked] wrote about "Re: [hackers-il] cat /dev/curious":
>...

When I was younger, this was known as "geekness", not coolness :) Nice to know
that has changed!

> distastefull, unless they have a really good practical reason to.

I wholeheartedly agree. It's fun to show coworkers how I can enter their
machine in 10 minutes, but there's no fun breaking into other people's machine
without their permission.

And now for something completely different...

The wacky-looking C code below is my attempt, many years ago, to write
"Hello world" to the standard output, as any beginner tries.
Try it and see that it really works! (no, don't be paranoid, it isn't a virus
or a crack tool - just an Hello World program).

I'll invite the first person who can figure out how this works to a beer!
Has anybody written any obfuscated-python or obfuscate-scheme? :)

#define Xx putchar/****** The ultimate beginner's C code: Hello world! ******/
unsigned long xx=1,x=1;unsigned xX(){unsigned long XxX=5,XXx=((x<<XxX)+x)*(x<<
(XxX*XxX))-(x<<((XxX*(x<<(x<<x)))+(x<<x)))+01447155;xx=xx*XXx+(x<<((x<<((x<<(x
<<x))-x))-x))*((x<<((x<<x)+x))+(x<<x))*((x<<((x<<x)+x))+(x<<x))-(x<<((x<<((x<<
(x<<x))-x))+x))+(x<<((x<<(x<<x))+(x<<x)))-(x<<((x<<(x<<x))-x))+x;return(xx/((x
)<<(x<<(x<<(x<<x)))))%(x<<((xx<<(x<<(x<<x)))-x));}main(XxX,Xxx,xXX){int xxx=((
x<<(x<<(x<<x                                                      )))),XXX=xxx
*xxx/(x<<x),                                                      xxX;char X=x
+x<<x,*xXx="                     Obfuscated C                     ";for(xx=x;*
xXx;xXx+=x){                                                      *(xXx)^((x<<
x)*(x<<(x<<(                                                      x<<x))))&&((
xx*=xx,xx+=*xXx));}Xx(77^(xX()&((x<<(x<<((x<<x)+x)))-x)));Xx((XXX+'I')^(xX()&(
(x<<(x<<((x<<x)+x)))-x)));Xx((xxx)^(xX()&((x<<(x<<((x<<x)+x)))-x)));Xx(((XXX<<
x)-(x<<(x<<x))-x)^(xX()&((x<<(x<<((x<<x)+x)))-x)));Xx(0XAE^(xX()&((x<<(x<<(((x
)<<x)+x)))-x)));Xx(0x027^(xX()&((x<<(x<<((x<<x)+x)))-x)));Xx(','^(xX()&((x<<(x
<<((x<<x)+x)))-x)));Xx(137^(xX()&((x<<(x<<((x<<x)+x)))-x)));Xx(0117^(xX()&(((x
)<<(x<<((x<<x)+x)))-x)));Xx('W'^(xX()&((x<<(x<<((x<<x)+x)))-x)));Xx((XXX+((XXX
>>x))-11)^(xX()&((x<<(x<<((x<<x)+x)))-x)));Xx((((x<<(((x<<(x<<x)))-x))-x)*x+5[
" (C) [email-masked] "]-(xxx<<x))^(xX()&((x<<(x<<((x<<x)+x)))-x)));}

-- 
Nadav Har'El                        |         Monday, May 8 2000, 4 Iyyar 5760
[email-masked]             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |Computers are like air conditioners.
http://nadav.harel.org.il           |Both stop working if you open windows.

---

From: [email-masked]
Date: Mon, 8 May 2000 20:36:30 +0300

> or a crack tool - just an Hello World program).

Well, the redefining of X's is pretty blunt, and most of the rest is just
shifting bits. Cute hack though.

But it doesn't compile... The paranteses won't match. I'm afraid that one of
our mailers screwed something up. So either I debug it or you upload the .c
file to egroups.

This efforts looks quite easy to duplicate in python, if it allows to override
the putchar.

---

From: Moshe Zadka <[email-masked]>
Date: Mon, 8 May 2000 20:41:25 +0300 (IDT)

> This efforts looks quite easy to duplicate in python, if it allows to override

I doubt you'd get by without any indentation at all.

---

From: [email-masked]
Date: Mon, 8 May 2000 20:44:42 +0300

> I doubt you'd get by without any indentation at all.

oh, you can't override the tab and newline characters to be XXx? what kind of
language is that? :-)

---

From: "Nadav Har'El" <[email-masked]>
Date: Tue, 9 May 2000 11:17:31 +0300

> shifting bits. Cute hack though.

Sorry Chen, you don't get that beer :)

It's obvious I've made all the constants and variables in the program look
weird by changing them to xx,xX,XXx, etc., but you've missed a whole level
of complexity which you'll come across when you remove the previous layer
of camoflouge.

A hint: what happens when you change even one character in the "Obfuscated C"
string in the middle? Surely that string has some significance in the program.
Oh, but I'm starting to give out too much information :)

> our mailers screwed something up. So either I debug it or you upload the .c

Strange... you can get it from
	 http://harel.org.il/nadav/final3.c

> This efforts looks quite easy to duplicate in python, if it allows to override

I wrote this program after I saw on the Internet some "obfuscated C" contest
(this was back in 1993 - I don't know if they still have those). Apperantly
some people have turned writing obfuscated C into an artform, and there is
even a book about the subject!

Here's one of the cutest programs I found: a program that generates random
mazes, and itself looks like a maze. Unfortunately, now it just dumps core
(it worked on SunOS and AT&T System Vr4), and it's terribly annoying to
debug obfuscated programs...

char*M,A,Z,E=40,J[40],T[40];main(C){for(*J=A=scanf(M="%d",&C);
--            E;             J[              E]             =T
[E   ]=  E)   printf("._");  for(;(A-=Z=!Z)  ||  (printf("\n|"
)    ,   A    =              39              ,C             --
)    ;   Z    ||    printf   (M   ))M[Z]=Z[A-(E   =A[J-Z])&&!C
&    A   ==             T[                                  A]
|6<<27<rand()||!C&!Z?J[T[E]=T[A]]=E,J[T[A]=A-Z]=A,"_.":" |"];}

I also had (but can't find now) a program that generated a (rather bad)
approximation of PI that looked like a circle. It actually worked by
calculating it's own area, and dividing by its radius! The whole program
looked something like _-_-_-_... where _ was a define, which added up the
number of "_" to calculate the area.

-- 
Nadav Har'El                        |        Tuesday, May 9 2000, 4 Iyyar 5760
[email-masked]             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |I had a lovely evening. Unfortunately,
http://nadav.harel.org.il           |this wasn't it. - Groucho Marx

---

From: Gaal Yahas <[email-masked]>
Date: Tue, 9 May 2000 18:07:43 +0300

> number of "_" to calculate the area.

Yeah, by Brian Westley, from the 1988 contest. If you feel the
approximation is not close enough, enlarge the circle:

==snip==
#define _ -F<00||--F-OO--;
int F=00,OO=00;main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}F_OO()
{
            _-_-_-_
       _-_-_-_-_-_-_-_-_
    _-_-_-_-_-_-_-_-_-_-_-_
  _-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
  _-_-_-_-_-_-_-_-_-_-_-_-_-_
    _-_-_-_-_-_-_-_-_-_-_-_
        _-_-_-_-_-_-_-_
            _-_-_-_
}
==snip==

-- 
believing is seeing
[email-masked]
http://www.forum2.org/gaal/