Lessons for Newbies

Discussion about hacker.org's server
falcon2424
Posts: 30
Joined: Mon Apr 30, 2007 9:35 pm

Lessons for Newbies

Post by falcon2424 »

Since it seems like there are a lot of people on this board who want to learn more about computers I thought a newbie thread might be a good idea.

While I'm not the most skilled hacker on the board (Captain Segfault, for example is far better than I am), I do feel that I'm qualified enough to give people a few pointers in the right direction.

So, my idea is that I'll make a challenge or lesson about once a week that will be intended to help people figure out more about computers and programming. They'll be aimed at beginners, so if you've already coded a solution to one of the hacker.org puzzles, you might find them too easy.

People who are more experienced than me should feel free to chime in if there's anything to add/comment on.

For the people who are interested:

1. First, read http://catb.org/~esr/faqs/smart-questions.html . Please try to follow the recommendations. In particular, hackers tend to try and write fairly well, and there are reasons why they consider good spelling and grammar important.

2. Post in this thread that you're interested.

3. Since a lot of the new people seem to be running Windows XP, my first challenge will be based in XP. Here's some batch script code:

hacker1.bat

Code: Select all

echo 206.130.108.92  hacker.org >> c:\windows\system32\drivers\etc\hosts
echo foo
echo 206.130.108.92  www.hacker.org >> c:\windows\system32\drivers\etc\hosts
The first challenge is simply to figure out what this code does and why.

As a hint, the way you make a batch file is to open notepad, put the code in notepad, and then save the file as "filename.bat" you can run a file ending in .bat by double clicking on it.
Last edited by falcon2424 on Tue Sep 11, 2007 4:39 am, edited 1 time in total.
memesmith
Posts: 2
Joined: Sun Sep 09, 2007 7:17 pm

Post by memesmith »

Is this a trick question?
User avatar
jack krauser
Posts: 1005
Joined: Wed Aug 29, 2007 5:45 pm
Location: greece
Contact:

Post by jack krauser »

memesmith wrote:Is this a trick question?
well is worth a try :wink: :twisted: :twisted: :twisted:
hacker is a life style. its one that alters how you think, you perception of reality, your way of dealing with things in general, as well as things so common as how you talk, how you carry yourself, and even when and how long you sleep.

by Loyal_Dark
falcon2424
Posts: 30
Joined: Mon Apr 30, 2007 9:35 pm

Post by falcon2424 »

memesmith wrote:Is this a trick question?
Not really. There's a reason I picked this code. It has an obvious and non-harmful effect.

The people who can look at that and go, "oh, I know what that would do" aren't really what I'd consider total newbies, and aren't the people posting, "how do I be hacker" threads.

My thought was that, in order for a beginner to figure out what this code does they'll have to learn a little about a few important things, like command line syntax (even if it is on windows) and how to make sense of a system config file.

More importantly, it'll be a good lesson on how to figure out how to search for solutions to problems or computer quirks. I really do think that google-foo is one of the most useful skills there is for hackers.

-------
Unless you mean that I somehow screwed up and forgot a "\n" character or something. If that's the case, then I feel a bit embarrassed, and my only excuse is that I haven't had a windows computer in a few years now.
R0dM@n
Posts: 1
Joined: Thu Sep 06, 2007 8:54 pm

Thanks for starting this thread.

Post by R0dM@n »

I've always been of the mindset that self-teaching is the best way to learn. It seems, however, that mentorship goes hand-in-hand. I also believe, if you don't use it you loose it. This is why I am looking forward to more posts like this. I've stumbled off the coding trail for awhile, and enjoy solving directed problems, to re-sharpen those much needed skills.

------
I may embarrass myself, but I think the quotes defeat the purpose of that code. Then again, that is a good lesson by itself.
User avatar
jack krauser
Posts: 1005
Joined: Wed Aug 29, 2007 5:45 pm
Location: greece
Contact:

Re: Thanks for starting this thread.

Post by jack krauser »

R0dM@n wrote:I've always been of the mindset that self-teaching is the best way to learn. It seems, however, that mentorship goes hand-in-hand. I also believe, if you don't use it you loose it. This is why I am looking forward to more posts like this. I've stumbled off the coding trail for awhile, and enjoy solving directed problems, to re-sharpen those much needed skills.

------
I may embarrass myself, but I think the quotes defeat the purpose of that code. Then again, that is a good lesson by itself.
so did you solve the mission he ask? :twisted: :twisted:
hacker is a life style. its one that alters how you think, you perception of reality, your way of dealing with things in general, as well as things so common as how you talk, how you carry yourself, and even when and how long you sleep.

by Loyal_Dark
Kilo
Posts: 152
Joined: Thu Jul 19, 2007 5:59 pm
Contact:

we making a btach file that will do this

Post by Kilo »

HOSTS file is a file used to map IP addresses to domains.
all echo does is display information
ohh and you can also use this to block ad servers
Last edited by Kilo on Mon Sep 10, 2007 5:02 pm, edited 1 time in total.
thous in need of help let me know and ill do my best to advise you Remember i am not fault for damge you cause this is for learning Purposes only!!! visit http://nongkrong.team-forum.net/
User avatar
jack krauser
Posts: 1005
Joined: Wed Aug 29, 2007 5:45 pm
Location: greece
Contact:

Re: .........why are we making a btach file that will do thi

Post by jack krauser »

Kilo wrote:HOSTS file is a file used to map IP addresses to domains.
all echo does is display information
nice i found the same thing :twisted: :twisted: :twisted:
hacker is a life style. its one that alters how you think, you perception of reality, your way of dealing with things in general, as well as things so common as how you talk, how you carry yourself, and even when and how long you sleep.

by Loyal_Dark
Kilo
Posts: 152
Joined: Thu Jul 19, 2007 5:59 pm
Contact:

as for the ip makes me wounder

Post by Kilo »

IP Address : 206.130.108.92 [ cutelittlekittens.com ]
ISP : WestHost
Organization : WestHost
Location : US US, United States
City : Providence, UT 84332
Latitude : 41°69'29" North
Longitude : 111°81'47" West
thous in need of help let me know and ill do my best to advise you Remember i am not fault for damge you cause this is for learning Purposes only!!! visit http://nongkrong.team-forum.net/
User avatar
jack krauser
Posts: 1005
Joined: Wed Aug 29, 2007 5:45 pm
Location: greece
Contact:

Re: as for the ip makes me wounder

Post by jack krauser »

Kilo wrote:IP Address : 206.130.108.92 [ cutelittlekittens.com ]
ISP : WestHost
Organization : WestHost
Location : US US, United States
City : Providence, UT 84332
Latitude : 41°69'29" North
Longitude : 111°81'47" West
yeah wtf??? :?
hacker is a life style. its one that alters how you think, you perception of reality, your way of dealing with things in general, as well as things so common as how you talk, how you carry yourself, and even when and how long you sleep.

by Loyal_Dark
Kilo
Posts: 152
Joined: Thu Jul 19, 2007 5:59 pm
Contact:

oh that

Post by Kilo »

all dat is is the ip that information i got from searching what that ip was in the bat file
thous in need of help let me know and ill do my best to advise you Remember i am not fault for damge you cause this is for learning Purposes only!!! visit http://nongkrong.team-forum.net/
Kilo
Posts: 152
Joined: Thu Jul 19, 2007 5:59 pm
Contact:

am interested

Post by Kilo »

Am interested.
thous in need of help let me know and ill do my best to advise you Remember i am not fault for damge you cause this is for learning Purposes only!!! visit http://nongkrong.team-forum.net/
falcon2424
Posts: 30
Joined: Mon Apr 30, 2007 9:35 pm

Re: Thanks for starting this thread.

Post by falcon2424 »

Rodmon wrote:I may embarrass myself, but I think the quotes defeat the purpose of that code. Then again, that is a good lesson by itself.
I had my roommate test the code on a windows computer and you're entirely right.

Everyone, I apologize, I should have left the quotes off, as it seems that they break the echo command. I guess this is what I get for not double checking everything and assuming that windows works like unix.

The next thing I do will be in perl, which is installed on both my Ubuntu and OSX machines.
User avatar
jack krauser
Posts: 1005
Joined: Wed Aug 29, 2007 5:45 pm
Location: greece
Contact:

Re: Thanks for starting this thread.

Post by jack krauser »

falcon2424 wrote:
Rodmon wrote:I may embarrass myself, but I think the quotes defeat the purpose of that code. Then again, that is a good lesson by itself.
I had my roommate test the code on a windows computer and you're entirely right.

Everyone, I apologize, I should have left the quotes off, as it seems that they break the echo command. I guess this is what I get for not double checking everything and assuming that windows works like unix.

The next thing I do will be in perl, which is installed on both my Ubuntu and OSX machines.
it's ok :wink: ok now the next mission :twisted: :twisted:
hacker is a life style. its one that alters how you think, you perception of reality, your way of dealing with things in general, as well as things so common as how you talk, how you carry yourself, and even when and how long you sleep.

by Loyal_Dark
CyanideSociety
Posts: 1
Joined: Sun Sep 16, 2007 8:34 pm
Location: SOCAL

Post by CyanideSociety »

Okay, this is probably a really stupid question, but when I make the BAT file and run it, it instantly closes when I open it, I've been playing around in C++ too and when I make those little beginner programs it does the same thing, just closes as fast as it opens. Any idea on how to make it stay? I've tried running cmd and opening the file from there as well
Post Reply