Friday, March 26, 2010

first impressions of Google’s Skipfish WVS

after getting really interested in a late Google project, i spent few hours today with Google’s Skipfish v1.25b , which is a Google project for a web application security scanner , or as some times referred in the professional arena – a WVS ( web vulnerabilities scanner ) and is completely open source as i like it.

as i mentioned, i am playing with version v.1.25b ( although 1.26b is available at time of writing the article ) against a vulnerable demo web application that i wrote a few months back… and got some impressions on the current version.

first of all, i have to admit , its blazing fast … once given a destination to scan, the scan is fast , and the results are displayed in a very elegant way ( although a bit too hardcore ) moreover the depth and methods of detecting problems are quite impressive.

that being said .. the security checks themselves missed lots of the application vulnerabilities , including some quite basic SQL Injections which were there especially for security demonstrations. but i will give the credit and wait until this tool matures a little more before i try it again , and i am sure it will be much better.

the report is excellent , very insightful and shows track of the trace of the stream until the vulnerability has been detected , which is always good, nevertheless – i would like to see in future versions some different export mechanisms of reports, such as XML and PDF, to make it more usable in the IT security ecosystem environment.

there is a point to remember that at current time it is being written and managed by one person at Google , as compared to enterprise tools such as IBM’s Rational AppScan or Qualys etc, so you have to give credit here :)

for ease of use , it is easy , but i do expect a UI , since most people that will run this scanner will require some interaction with it that does not require any CLI / Linux skills, since it is not in their job requirements , they just need to run a tool and test for baseline ( unfortunately that also includes lots of “consultants” ).

if i am to rate this tool , i would rate it at its current version (1.25b) with 6.5 of 10 for now , since i really like the speed and the overall architecture of it , but i do see the need for some more maturity and some more robust security tests.

it detected 9 of 14 SQLi and 4 of 8 XSS , and none of the 4 persistent XSS vulnerabilities ( although it claims to detect it ) .. and yes , i have fed it some credentials as needed..

its a descent alternative to lots of the tools out there even in its current stage , and i would definitely go back to it when some holes are put to its belt.

 

Finally, just a quick install HOW-TO for it.
if you want to install it under CentOS ( i used 5.2 ) then do the following :

1. download and extract the tgz file anywhere ( example : tar zxpfv skipfish*.tgz )
2. install some neccesary packages for the install

- yum instll gcc
- yum install openssl-devel
- yum install libidn-devel

3. step into the folder extracted and run – make
4. there you go. :)

Labels: , , , , ,

Friday, June 19, 2009

iSCSI Storage Initiator / Target in a Linux Environment

I have decided to share a short technical experience that i had recently. so in my pursue of a way to build a Home Linux Storage System , and also have a Software iSCSI interface to connect to it , since my home setup of hardware wont suffer an HBA addition . i did some research around sofware iSCSI. and although it is CPU Intensive, this might assist those of you that have a need for external disks.

the concept was to have a central home storage , have only small disks on my lab computers that will just run the thin OS , and then mount the drives from a central server – to which i connected a 1000/100/10 Switch just for data.

so the lab was divided into two.

1. A Linux Server that owns Physical Drives and serves as an iSCSI Target.

2. A Linux Workstation that needs to mount an external iSCSI disk Initiator.

 

1. How To Build The Linux Storage Server :

Install CENTOS 5.1
- yum update ( to update the OS to the latest )
- yum install kernel-devel ( optional )
- open firewall ports
- rpm -ivh iscsitarget-0.4.15-4.el5.i386.rpm
- rpm -ivh iscsitarget-kmdl-2.6.18-128.1.10.el5-0.4.15-4.el5.i686.rpm
- mkdir /home/iSCSI
- dd if=/dev/zero of=/home/iSCSI/LUN0 bs=1M count=512    ( 512 is size of disk in MB)
- vi /etc/ietd.conf and add the following lines
      Target iqn.2009-06.com.example:mydisk
      IncomingUser username password
      OutgoingUser username password
      Lun 0 Path=/home/iSCSI/LUN0,Type=fileio
      Alias mydisk
      InitialR2T Yes
      ImmediateData Yes
      MaxOutstandingR2T 8

- vi /etc/initiators.allow 
      add -> ALL ALL ( note : This is an access list )
- reboot ( to make new kernel appear and load the module )
- /etc/init.d/iscsi-target restart
- validate in tail -f /var/log/messages

 

2. How To Have The Initiator Mount The Drive On The Workstation :

( my workstation is also a centos in this case )

-  rpm -i iscsi-initiator-utils-6.2.0.868-0.18.el5.i386.rpm ( this is the util )

- vi /etc/iscsi/iscsid.conf
    #enable the following :
        node.session.auth.username = username
        node.session.auth.password = password
        discovery.sendtargets.auth.username = username
        discovery.sendtargets.auth.password = password

- /etc/init.d/iscsi start
- iscsiadm -m discovery -t sendtargets -p <ip of server>
- /etc/init.d/iscsi restart
- tail -f /var/log/messages --> to find the device representation
- fdisk /dev/sdd --> if the disk is sdd ...
        n primary partition
        w write table
- mkfs.ext3 /dev/sdd1
- mkdir /mnt/iscsi
- mount /dev/sdd1 /mnt/iscsi
- chkconfig iscsi on --> to mount at boot time auto
- vi /etc/fstab
         add line -> /dev/sdd1 /mnt/iscsi ext3 _netdev 0 0

by the way , mounting an iSCSI using Windows Vista is also an easy task .. play with it :)

 

Anyway, Thats it.

Labels: , , , ,

Friday, March 07, 2008

Wireless Under Linux : Monitor Mode

As some of you may already know , one of my biggest and oldest hobbies is linux.

As such , the first thing i will try with almost any computer \ laptop \ device i get - is to try a linux distro on it , and test it for playfulness . but most of the times , these computers are not mine , so its kind of helping guys out on the way.

This past week , ive been asked with a question by a collegue of mine , and that is actually a question that i get alot regarding wireless hacking with a linux box. the question is "how do i set my wifi card to Promiscuous Mode ?" which is something many new guys on a linux platform find hard to achive. and it is a very important knowledge for anyone in the Pentesting field , or if its a "hobbie".

The reason for that is preety simple... when you want to use your card for packet injection , and sniffing - you need to put it on a passive mode. this moe is called "Monitor-Mode" when refering to linux. after you do that - you can usually fire up any wireless hacking \ sniffing program that you want.

The problem is that on some cases , trying to set up the card to Monitor Mode by issuing the command : iwconfig ath0 mode Monitor , will result in an "Invalid Input" or a "Set Mode (8B06)" message on your screen. and any attempt to change that will not be succesful, even if you use patched drivers ( like MadWifi ) and such.

The solution to that is quite simple actually. use the wlanconfig tool.

In order to change the card's mode to the desired one , first of all - put it to sleep by issuing the command ifconfig ath0 down ( ath0 stands for the interface's name ). then use the wlanconfig tool by issuing the following commands :

wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode monitor
ifconfig ath0 up

Thats it. your card is now in Monitor Mode.

In order to put the card to the original state , repeat this sequence of commands, but instead of choosing the wlanmode monitor , choose wlanmode managed.

Hope this short guide was helpful.

Labels: , , ,

Sunday, September 23, 2007

איך להקים שרת קבצים פשוט ובטוח על Linux

בעקבות מספר בקשות ושאלות שנשאלתי בדואר אלקטרוני ועל ידי כל מיני חברים ( בעיקר בעקבות הקמת שרת הקבצים הביתי שלי ) החלטתי לבנות מעין מדריך קצר ולעניין, אשר מסביר כיצד מקימים שרת קבצים פשוט מבוסס לינוקס. שימו לב , לא שמתי יותר מידי דגשים על התממשקויות למערכות צד שלישי וכדומה, אלא בעיקר על יצירת מערכת SHARING עובדת עם רמת אבטחה סבירה.

הסיבה לכך שהקמתי את שרת הקבצים הייתה - ריבוי הסרטים , שירים , קליפים , מסמכים ותמונות שיש לי ברשת הביתית שלי , והקושי בנגישות אליהם בכל פעם. החלטתי שאני רוצה לאפשר לכל המחשבים לצפות בסרטים , לנגן שירים ולראות תמונות באותו הזמן , וכמובן בקוד פתוח ובקלות. יחד עם כל שרתי הקבצים הנמכרים כיום לשימוש ביתי במאות דולרים - החלטתי שזה לא בשבילי - אני צריך משהו שאפשר לשדרג כל הזמן , ומשהו שיעלה מעט.

חומרה נדרשת :

המפרט אשר אני ממליץ עליו לצורך הקמת שרת ביתי שכזה :

  • מחשב מדף פשוט עד 1000 ש"ח ( ניתן לקנות בכל חנות אינטרנט ) עם בקר SATA ומפרט בסיסי.
  • להוסיף הרדיסק SATA לפי הצורך - אני ממליץ 500GB של WD ( בערך 500 ש"ח ).
  • להחליף קירור בקירור שקט של 12" למאווררים - ( כ50 ש"ח ).
  • כרטיס רשת 10/100 כלשהו, עדיף Intel בגלל התמיכה ללינוקס ( כ 35 ש"ח )

החומרה שלי ( הייתה קיימת , ולכן השתמשתי ) :

אני השתמשתי ב : מחשב VIA EPIA 1200 פשוט עם 256MB זיכרון ( אולי אגדיל ) דיסק קשיח 40GB למע' הפעלה ( IDE ) בקר PCI עבור כרטיס RAID של Sweex ( בחומרה ) שאליו מחוברים 2 דיסקים של 500GB בRAID1 ( זה כי אני תמיד מגזים ) וכמובן ממשק רשתי פשוט של 10/100 של INTEL.

LINUX :

כדאי לדעת צעדי לינוקס בסיסיים בכי להשתמש במדריך הזה , בכדי להקל על עריכת קבצים וההתקנה אותה אין בכוונתי להסביר כאן. לצורך ההקמה נשתמש בCENTOS LINUX 5 אשר ניתן להוריד בחינם מהקישור הבא mirror.isoc.org.il . שימו לב , יש להוריד או DVD או 6 דיסקים , למרות שלא נצטרך את כולם. אגב, כל גרסת לינוקס תתאים. -- יש להתקין את הלינוקס נקי לחלוטין , ולדעתי אין צורך בFIREWALL עליו.

SAMBA :

בלינוקס , הגורם המקשר את סביבת פרוטוקול SMB של חלונות , לבין לינוקס - הוא פרוייקט סמבה , אשר משמש כממשק בין מערכות ההפעלה השונות. בעצם המטרה שלנו היא לקבל SHARE של מחשב הלינוקס - במחשבי החלונות שלנו.

יש להתקין את samba על המחשב , ולהקפיד על גרסה אחרונה כמובן ( בסביבת REDHAT\CENTOS\FEDORA הפקודה היא yum -y install samba )

כעת יש להוסיף משתמשים למערכת , לצורך העניין נקרא למשתמש linuxshare במדריך זה ( למי שלא זוכר , מוסיפים משתמש זה על ידי useradd -m -G users -s /bin/bash linuxshare ) אסמן את שם המשתמש עם קו תחתי מעכשיו , שיהיה קל לשים לב ולשנות בהתאם.

יש לקבוע למשתמש החדש סיסמה על ידי passwd linuxshare

כעת יש לערוך את הקובץ - etc/samba/smb.conf/ אשר מכיל את הקונפיגורציה המתאימה לאפליקציה ויש להכניס את השורות הבאות.

# general definitions
[global]

workgroup = MSHOME
server string = My File Share
log file = /var/log/samba/log.%m
max log size = 50 

# security config
security = user
hosts allow = 127.0.0.1 192.168.1.0/24
hosts deny= 0.0.0.0/0

# server password file
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd

# shares
[FileServer]
comment = File Server Share
path = /home/linuxshare
valid users = linuxshare
public = no
writable = yes
printable = no
create mask = 0765

הערה : שימו לב לשורת הhosts allow , אשר משמשת כמעין IP FILTER שמאפשר התחברות רק מכתובות הרשת הרלוונטית , יש לשנות בהתאמה , כמובן את 127. רצוי להשאיר כי מדובר בloopback

כעת עלינו להעתיק את קובץ הסיסמאות של מע' ההפעלה בכדי לשייך את המשתמשים הקיימים במערכת למערכת הSAMBA שלנו על ידי -

cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd
chmod 600 /etc/samba/smbpasswd

כעת עלינו לקבוע סיסמת משתמש השיתוף על ידי הפקודה

smbpasswd linuxshare

עתה נפעיל את הישום בפעם הראשונה ואף נוסיף אותו לסקריפט העליה של המחשב ( בכדי שיעלה בכל פעם מחדש כמובן )

service smb start
/sbin/chkconfig --level 345 smb on

זהו , כעת לכו ל"שכנים ברשת" והתחברו לשרת שלכם באמצעות השם והסיסמה שבחרתם. במידה ועקבתם אחר כל ההוראות , זה אמור לעבוד.

אולי הייתי מוסיף גם CLAMAV בתור אנטיוירוס שיסרוק כל העתקת קבצים לשרת ( אצלי יש AV רשתי )

אני מאמין גדול בשרתי קבצים ביתיים , אני מאמין שהם מקלים את העבודה,  לטווח ארוך חוסכים באמצעי אכסון ומשאבים - שכן אין צוך שלכל מחשב בבית ( ולי יש 8 פעילים ) יהיה  דיסק קשיח מפוצץ , אלא מספיק שיהיה משהו כמו 80GB למשתמש ממוצע ( אני לא ממוצע כנראה ) ושיהיה שרת קבצים עם רוב האכסון עליו , כך ניתן להגדיר לכל משתמש נפח משלו , או נפח אכסון כללי לכולם , אצלי למשל הMy Documents בסביבת הWindows הוא בעצם Mount לכונן רשתי מתאים.

אגב , ניתן לשלב במערכת גם CLAMAV אשר בודק את הקבצים הנכתבים לדיסק המשותף , אצלי זה מוטמע , אבל פוגע בביצועים ,כשאני אמצא איך לשפר - אני אכתוב מדריך גם לזה פה. בנתיים המחבר בין האלמנטים הוא בunstable ולכן לא רלוונטי.

בהצלחה.

Labels: , , , , , , , ,

Tuesday, July 10, 2007

Fedora 7 on HP nc2400



all of my hebrew readers . please excuse me , but because i want to make this post handy for other nc2400 users - i will post it in english.

i have got my hands on a new HP NC2400 laptop that replaced my older Dell D620 laptop. and here is how i set up my fedora 7 on it.

first of all ... i must admit - almost everything worked out of the box . which is quite amazing for a branded laptop ... maybe the only 2 things that didnt work were the wireless "Intel IPW945/PRO Wireless (rev 2.0) wireless card , and the AutheTed fingerprint reader . well since i do not use the fingerprint reader - i did not even set it up , so excuse me all of you finger print users.

my set up is quite simple - gnome with beryl , 2.6 kernel and the rest are networking\pentesting tools ... that are not worth mentioning

wifi -
i am thinking of how to give you the easiest way to bring it up ...
well its easy ...

fist esit the file "/etc/modprobe.d/blacklist file and add the following lines :
--
#IPW3945
blacklist iwl3945
blacklist mac80211
--

and reboot it ...
then add the "freshrpms.net" repository ... and run "yum search ipw3945"
install the dkms package , the ipw3945d package and the ipw3945 firmware package ...
reboot and your done .

the 12.1 inch resolution was also automatic , so no use for 915_resolution tool , you may want to install the wpa_supplicant tool in order to connect to wpa2 easier.

i would also recommend running the NetworkManager tool to manage the network connections from within gnome . i personally disabled the eth1 ( the wifi interface ) automatic dhcp via the /etc/sysconfig/network-scripts/ifcfg-eth1 file

thats about it . everytning is running fine , yum update rand perfectly , and its a gogogo from now on.

enjoy linux.

Labels: , ,

Friday, June 29, 2007

מי היה מאמין , 2007 - קשיים בלינוקס

לא מזמן התחלתי לשחק עם מעבר לסביבה ארגונית בצד הclient אשר תכיל אך ורק את מערכת ההפעלה אשר לא נוצרה על ידי מפלצות ורובוטים ממאדים ( לא יודע , ככה שמעתי :-) ).
ובכן , נשארו מספר דברים שפשוט לא עובדים , וזה יכול לשגע פילים.

1. Evolution כתחליף טוב לOutlook ,
ובכן - ברוב הסביבות זה עובד , אבל מה עם
סביבת MultiDomain ? כאן המערכת פשוט לא נותנת פתרון . למי שלא יודע לEvolution יש
תוסף חביב מבית Novell ( חינם ) אשר בעצם מתחבר לOWA ומבצע עליו Parsing כך
שלמעשה תוכנת הEvo... יכולה להתחבר ולהתנהג כOutlook לכל דבר , אבל ברגע שצריך להכניס שם משתמש חריג - כמו למשל domain\user - משום מה זה לא מתנהג טוב , כלומר פשוט לא עובר את שלב האימות .

2. Juniper Hostchecker
פשוט לא עובד טוב דרך Firefox , ואני מדבר על הפעלה דרך JRE1.6 ככה שהתמיכה מבחינת Juniper אמורה להיות מלאה , משום מה הFirefox פשוט לא מוכן לקרוא את הJavaScript שהמכונה שולחת לו , ואשר לא מתבצעת בדיקה - ולכן כרגע אני לא מצליח להתחבר SSLVPN.

3. WPA + DELL
שיהיה לכם בהצלחה ... אני את המלחמה שלי מסיים אם Orinoco ככרטיס תחליף , כי בשום
אופן לא הצלחתי להפעיל את הWPA על כרטיס Broadcom Dell MiniLAN 1390 WIFI rev 01
כיף נכון ? ( כל שאר ההצפנות עובדות חלק , כולל עבודה מול 802.1x )

אתם מוזמנים להגיב, אני אעדכן את הפוסט הזה , אם יהיו שיפורים , אבל הוא נכתב אחרי 48 שעות של דם יזע ומקלדת



ותזכרו : "פצעים מחלימים , בחורות אוהבות צלקות , ותהילה נשארת לנצח"

Labels: ,


About

    My Name is Barry Shteiman, im a devoted tech junkie, and this is my blog.
    E: barry.shteiman -at- gmail.com
    Twitter : bshteiman

Tags & Categories

Mailing List & RSS

Stay Updated  
Add to Technorati Favorites