Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 68 guests online
 
Advertisement

You are here: Home
EH-Net
May 24, 2013, 10:55:19 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Go back to The Ethical Hacker Network Online Magazine Home Page
 
  Home Help Calendar Login Register  
  Show Posts
Pages: 1 [2] 3 4 ... 20
16  Ethical Hacking Discussions and Related Certifications / Malware / Re: Injecting Virus in pics... on: July 30, 2008, 01:21:30 PM
My pleasure.  Smiley
17  Ethical Hacking Discussions and Related Certifications / Malware / Re: Injecting Virus in pics... on: July 29, 2008, 02:01:39 PM
Try working your way through these; http://www.hellboundhackers.org/challenges/stegano/index.php. You'll have to register at that site first. Once you've done the challenges, I believe that you'll be able to answer your own question.
18  Ethical Hacking Discussions and Related Certifications / Other / Re: Can you teach me to hack? on: July 28, 2008, 03:10:54 PM
Congratulations, and enjoy your sleep while you get it. Smiley

I was joking one day with one of my colleagues that I'd like to teach my daughters TCP/IP. He said that when he has kids he'll sign them up for Linux 101 first.

Seriously though, I do (rarely) take my kids to work, and they love it. I have them organizing the labs, rolling up ethernet cables, etc. You be suprised how useful small hands and fingers can be when trying to put your hand in between some network devices in a full rack.
19  Ethical Hacking Discussions and Related Certifications / Network Pen Testing / Re: Ferret on: July 04, 2008, 02:34:10 PM
Perhaps you have to install Python on the box where you have the Python script. It doesn't come by default with all *NIX distros you know.

BTW, why are there Python scripts in a Ruby indexer. (FYI, I am not familiar with neither Python, Ruby nor Ferret).
20  EH-Net / Calendar Of Events / Re: DEFCON 16 on: July 03, 2008, 04:04:24 PM
You reading this Negrita, lol?   

Yup.  Cheesy I've now also got a visa for the USA. I was supposed to go to the USA last October but I only got the visa at the end of November. Someone else went in my stead.

Hope you all enjoy the con. Maybe I'll come to one of the future ones.
21  Resources / Tools / Re: BackTrack 3 Final released on: June 28, 2008, 05:56:30 PM
It seems things that used to work have been broken. My mouse wheel didn't scroll in BT3 while in BT2 it did. I eventually managed to fix this by editing /etc/X11/xorg.conf. The fix is to edit line 285 as follows;
Code:
    Option "Protocol"    "IMPS/2"

This was on my home PC. I have not been able to test this on my work laptop as it's been sent of to IBM for fixing (mobo went crazy  Cry ). So I'll only be able to check if this is a local issue for me when I get it back during next week. I do presume that it is dependant on what type of mouse you have, however the previous configuration
Code:
    Option "Protocol"    "ps/2"
just didn't work for my generic PS2 mouse.

Anyway if it's a global issue, then you can all just use the fix above.
22  Resources / Tools / Re: BackTrack 3 Final released on: June 25, 2008, 02:05:40 PM
OK, I've been messing about with the VMware version, and I've noticed some differences from the Backtrack 2 ChicagoCon VMware version;
1. When installing on VMware Workstation 5.x you get a Kernel Panic while booting the VM image. This does not occur with VMware Workstation 6.
2. The man pages work.  Cheesy
3. Many of the tools have been updated and there are many new tools too, though I have not tried many of them.
4. Firefox doesn't seem to be working optimaly. I'm not sure why, though I found myself becoming frustrated trying to use it. The text didn't seem clear though the graphics for other apps seemed just fine. I'm still checking this to find the root of my irritation with this.
5. The VM NIC came configured in bridged mode while most VM NICS (including the previous version) come in NAT mode - minor gripe, but it wasted my precious time while I was raring to go with this distro.
23  Ethical Hacking Discussions and Related Certifications / Network Pen Testing / Re: Strange Ip Addresses on: June 11, 2008, 03:27:28 PM
After a bit of retrospect, I don't see how a personal firewall can be stateful. A stateful firewall should;
1. Detect packet spoofing so that you don't get packets with private IP addresses in their source arriving at your gateway.
2. Check the session state. i.e. It won't let an ACK into the network if it didn't see the SYN going out first.
3. Close sessions based on a preconfigured timeout, so that it won't allow a seemingly valid packet for a session that has been idle for many hours.

Personally I think it more practical to configure something like this at the gateway or in the DMZ than on workstations themselves.
24  Ethical Hacking Discussions and Related Certifications / Network Pen Testing / Re: Strange Ip Addresses on: June 11, 2008, 02:41:47 PM
I am not very familiar with Comodo. At home I have Zone Alarm installed on Windows, and an access list on my router. At work I sometimes (rarely) use Sygate, but not for protection, but rather for session analysis.

Back in my old job (until 2006) I used to work with commercial firewalls on a daily basis. Check Point and Fortigate were definately the best I worked with. I must admit that since then I haven't touched a firewall.  Embarrassed
25  Ethical Hacking Discussions and Related Certifications / Network Pen Testing / Re: what do you prefer??? on: June 10, 2008, 03:28:54 PM
Both. CLI is usually much more powerful and gives greater control. However sometimes it is much faster and more convenient and efficient to do certain things via the GUI.
26  Ethical Hacking Discussions and Related Certifications / Programming / Re: morenames.pl on: June 08, 2008, 06:21:57 PM
Thanks shakuni, you've been more help than you realise. Firstly the /i switch works great - Chris Gates has now been found.  Tongue

Your remark about the script working fine on your system, and it beeing a problem on my system got me thinking. The thing is I had tried this on both my home PC and on my laptop from work and got the same result, before posting here.

So I got to thinking about how I had been running the script and how you had probably run it. When I ran the script I would go through the menu in numerical order to make sure all the options worked. I then thought that you had only tried option 3 in the menu. I did some testing and I found that when choosing option 3 it works fine but when choosing option 2 (Sort names by first name) before option 3 the result would be the entire list and the chosen search string doubled.

I looked at the code and found that in the loop for option 2 the array @keys is used but it is not undefined before option 3 begins. Obviously in option 3 $search is being added to @keys and this is giving the result I was getting. I managed to solve this by moving @keys = (); to the top of the loop for option 3.

The script is now working perfectly. For all those that didn't understand what I wrote above and want to know, the loop for option 3 now looks like this;

Code:
} elsif ($in eq '3') { #find a name (1 or more)

print "Search for what? ";
chomp($search = <STDIN>);

@keys = (); #undefine keys for next search

while (@n = each %names) {
if (grep /$search/i, @n) {
$keys[++$#keys] = $n[0];
}
}

if (@keys) {
print "Names matched: \n";
foreach $name (sort @keys) {
print " $names{$name} $name\n";
}
} else {
print "None found.\n";
}
27  Ethical Hacking Discussions and Related Certifications / Programming / morenames.pl on: June 07, 2008, 05:51:43 PM
I've been dilgently working my way through Laura Lemay's book Sams Teach Yourself Perl in 21 Days, and doing all the exercises at each stage. Each time I would find a bug, I would stop and not continue until I'd solved it. I've now finished chapter (day) 8 and I'm unwilling to continue, as I'm stumped by a script called morenames.pl.

This script takes its input from a list of names in a text file which I called namefile.txt. It presents you with a menu to sort the names in alpha-betical order by firstname or surname, to search for a name in the file or to exit.

The 2 sorting parts and the exit part all work fine, however it is the search part that's giving me trouble. Here is a copy of the name list I made up;

namefile.txt
Code:
Don Donzal
Chris Gates
Kirby Tucker
Ole DB
Kris Teason
Manu Zacharia
Ed Skoudis
HD Moore
Johnny Long
Oneeyed Carmen
Bill V
Role Reversal
Jim Bob
Slim Jim
Black Azarro
Gordon Lyon
Salvatore Sanfilippo
Joanna Rutkowska
Linus Torvalds
Bill Joy
Larry Wall
Dennis Ritchie
Richard Stallman

And here is a copy of the script;

morenames.pl
Code:
#!/usr/bin/perl -w
#This script reads names from a file.
#It offers a menu with which you can sort the names, or search them.

%names = ();  #hash of names
@raw = ();    #raw words
$fn = "";     #first name
$exit = 1;    #exit program
$in = '';     #temporary in
@keys = ();   #temporary keys
@n = ();      #temporary name
$search = ''; #thing to search for

while (<>) {
chomp;
@raw = split(" ", $_);
if ($#raw == 1) { #regular case
$names{$raw[1]} = $raw[0];
} else { #build a firstname
$fn = "";
for ($i = 0; $i < $#raw; $i++) {
$fn .= $raw[$i] . " ";
}
$names{$raw[$#raw]} = $fn;
}
}

while ($exit) {

print "\n1. Sort names by last name\n";
print "2. Sort names by first name\n";
print "3. Search for a name\n";
print "4. Quit\n\n";
print "Choose a number: ";

chomp ($in = <STDIN>);

if ($in eq '1') { #sort and print by last name

foreach $name (sort keys %names) {
print "$name, $names{$name}\n";
}

} elsif ($in eq '2') { #sort and print by first name

@keys = sort { $names{$a} cmp $names{$b} } keys %names;
foreach $name (@keys) {
print "$names{$name} $name\n";
}

} elsif ($in eq '3') { #find a name (1 or more)

print "Search for what? ";
chomp($search = <STDIN>);

while (@n = each %names) {
if (grep /$search/, @n) {
$keys[++$#keys] = $n[0];
}
}

if (@keys) {
print "Names matched: \n";
foreach $name (sort @keys) {
print " $names{$name} $name\n";
}
} else {
print "None found.\n";
}

@keys = (); #undefine keys for next search

} elsif ($in eq '4') { #quit
$exit = 0;
} else {
print "Not a good answer. 1 to 4 please.\n";
}
}

OK, so I run the script by typing morenames.pl namefile.txt in Linux or perl morenames.pl namefile.txt in Windows (I tested both) and choose option 3. When I get asked what to look for I type ch, but the output I get is all the names but with the names including lower case ch doubled. When I redo the test I get the correct output, but still in lower case only.

Code:
1. Sort names by last name
2. Sort names by first name
3. Search for a name
4. Quit

Choose a number: 3
Search for what? ch
Names matched:
 Black Azarro
 Jim Bob
 Oneeyed Carmen
 Ole DB
 Don Donzal
 Chris Gates
 Slim Jim
 Bill Joy
 Johnny Long
 Gordon Lyon
 HD Moore
 Role Reversal
 Dennis Ritchie
 Dennis Ritchie
 Joanna Rutkowska
 Salvatore Sanfilippo
 Ed Skoudis
 Richard Stallman
 Richard Stallman
 Kris Teason
 Linus Torvalds
 Kirby Tucker
 Bill V
 Larry Wall
 Manu Zacharia
 Manu Zacharia

1. Sort names by last name
2. Sort names by first name
3. Search for a name
4. Quit

Choose a number: 3
Search for what? ch
Names matched:
 Dennis Ritchie
 Richard Stallman
 Manu Zacharia

I would expect this second output the first time around. Note there is a line at the end of the loop @keys = (); Which is supposed to undefine keys for next search.

I would also expext to find Chris Gates in that list too. I tried using grep -i like I would in UNIX to ignore case sensitivity but Perl got very cross with me for doing this.  Embarrassed Evidently grep works differently in Perl than the way it does in UNIX. I also tried many lc and uc functions on the $name, $raw and $search variables but with no success.

So my questions are;
1. How can I change the script so that the search will be case insensitive?
2. Why does the script need 2 iterations to give me decent output?

I've searched the internet for fixes of this script and found none. I will probably find an answer to this in later chapters, but I'm stubborn and want to find this out before continuing with the info I have from the chapters until now.

BTW, I was using Perl 5.8.8 on BackTrack 2 , and ActiveState Perl 5.8.8 on Windows XP Pro if that interests anyone.
28  Ethical Hacking Discussions and Related Certifications / Programming / Re: What programing language is a more valuable when it comes to pen testing? on: May 28, 2008, 03:35:27 PM
BTW, to answer your original question, we used to have a poll here for just that question. Unfortunately the results can only be seen by Don now.  Sad

If I remember correctly Perl/Python/PHP took fist place with C/C++/C# in close second place. Perhaps Don can publish the exact final results here if he still has them.
29  Ethical Hacking Discussions and Related Certifications / Programming / Re: What programing language is a more valuable when it comes to pen testing? on: May 28, 2008, 03:10:06 PM
this is a great site for anyone interested in learning perl

This one is even better.  Wink

BTW, I think that the original Teach Yourself Perl in 21 Days is this copy here by Laura Lemay, though I may be mistaken. I am presently working through this book (I'm on chapter 8 at the moment) which I borrowed from the book library at my work. It was recomended to me by a regular Perl  developer, and so far has been well worth the effort.

Sometimes I get the feeling that I would be better of with the Camel Book or the Llama Book, but until now I've decided to stick it out with Laura Lemay.
30  Features / /root / Re: [Article]-Nmap from an Ethical Hacker`s View Part 1 on: May 28, 2008, 02:07:04 PM
rok, Kev has been back for a while now.  Wink
Pages: 1 [2] 3 4 ... 20
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.076 seconds with 21 queries.
 
Exclusive Deal

sansfire13_245x90_cw90.jpg
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:
 
Recent Forum Topics
EH-Net News Feeds
Latest Additions
 
         
Advertisement

© 2013 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.