LAC Magazine Sep Oct 2008HQ

Embed Size (px)

Citation preview

!

/ http://www.linuxac.org

:* "" OPENSER * : * / * "" : "" "" * / * Rootkit * * . : joe shlabotnik

/

............................................................................................... ............................................................................................. : : ............................. .........................................................OPENSER /........ "" : "" "".................................................

Inkspace ImageMagick ........................................................................FFmpeg ....................................... ........................................................................ RootKit ............... Live USB MSEC ""................................ ......................................................................................................... ........................................................................................

/

! ... ... ... ... ... ... ! "" . ... ... . "" "" ... ! "" ... . ... "" "" .... !

/

:

, ) ( GEGL cmyk ,

www.gimp.org

15951=http://www.linuxac.org/forum/showthread.php?t

, www.blender.org

: www.mandriva.com

276041=http://www.linuxac.org/forum/showthread.php?p

/

. NET . http://mono-project.com

0-2-http://www.itwadi.com/mono

.. : MIT FCC www.marefa.org

wiki www.linuxac.org/wik .

, . : http://www.sahara.com/index.php?lang=ar

:

/

: : : :

: ... . : . .

"" - -Copylefted Source Code " " GPL . Codes . Copyright - - : Codes .

"" . Copylefted Non-Copylefted : " .

. "" . . )( : "". " " ! . .GNU C++ Compiler " " ! "" !. GNU C++ Compiler - -MMC " " .GNU C Compiler MMC Front End" " "" . " " GCC " ". . .GNU Objective C NeXT . ) (.o GCC ) ( " " GNU Objective C .

/

: : :

" " !. "" "" GNU Lesser General Public License . "" " " Readline . Readline . " "... !. GCC " " . Code : " ... ! . ". " " .Copyright : . . " " "" . . " " . . . " " . . " " : " ". . )( . - - : " !". . . X X Consortium " " The Open Group . " " 4.6 X11R . . " "

) ( 3.6 . X11R . . .

4.6X11R

: : :

/

" ".

.Stand for something, or you will fall for nothing" ... " " ... ."

And if cynics ridicule freedom, ridicule communityif hard nosed realists say that prot is the only .idealjust ignore them, and use copyleft all the same

) (: " :Copyleft " " " .

/

"" OPENSER:

" " Voice Over Internet VOIP . . . " " .VOIP

" " ) (Voyp Packets Internet Networks IP-Based Networks : TCP .UDP Network Layers . : VOIP! .PSTN : A B PSTN A B A B A A A . .Circuit-Switched Networks Packet-Switched Networks Shared Network Resources . : Bandwidth PSTN

: "" OPENSER

/

: .PSTN !. . : Online Bandwidth .Resources on Demand Circuit-Switched Networks .Packet-Switched Networks " " Resource on Demand .PSTN " " ! VOIP-Server . . . : !. : SkypeYahoo Messenger MSN Messenger. .VOIP !. !. "" VOIP-Server : . .IP PBX . " " . PSTN . . . Conferences .... Announcements "" . : " " .

/

: "" OPENSER

. : : ) ( : Domain "" : PTSN : ) .(Trash

: .IP PBX IP PBX . : Domain . : PSTN Gateway .PSTN . .

) ( " " . . " " Aerisk .OPENSER OPENSER . " " LAN .Public Domains

: "" OPENSER

/

OPENSER Debian GNU/Linux : Debian GNU/Linux . : . ... Compiling. "" ) (VOIP VOIP . " " Debian OPENSER . ) (: GCC bison ex GNU make )sed and tr (used in the makeles GNU tar GNU install libmysqlclient openssl : OPENSER .MySQL .OPENSER . sources.list : .Terminal root : nano /etc/apt/sources.list : deb http://http.us.debian.org/debian etch main deb-src http://http.us.debian.org/debian etch main

/

: "" OPENSER

.nano vi .Vim

:

.

sources.list : apt-get update :apt-get apt-get install gcc bison ex make openssl libmysqlclinet15-dev mysql-server : . OPENSER : /usr/src : /2.2.1/debian:~# c d /usr/src/; wget -c http://www.openser.org/pub/openser src/openser-1.2.2-tls_src.tar.gz : debian:/usr/src# tar -zxf openser-1.2.2-tls_src.tar.gz ) (: debian:/usr/src# rm openser-1.2.2-tls_src.tar.gz :OPENSER debian:/usr/src# cd openser-1.2.2-tls module OPENSER

Makele

:MySQL

debian:/usr/src/openser-1.2.2-tls# nano Makele :mysql =?exclude_modules \ jabber cpl-c mysql pa postgres osp unixodbc mysql : =?exclude_modules \ jabber cpl-c pa postgres osp unixodbc

: "" OPENSER

/

OPENSER :OPENSER Compiling debian:/usr/src/openser-1.2.2-tls# make prex=/ all : debian:/usr/src/openser-1.2.2-tls# make prex=/ install /var/run :OPENSER debian:~# mkdir /var/run/openser " " OPENSER . OPENSER Debian GNU/Linux : debian:~# cd /usr/src/openser-1.2.2-tls/packaging/debian /debian:/usr/src/openser-1.2.2-tls/packaging/debian# cp openser.default /etc default/openser /debian:/usr/src/openser-1.2.2-tls/packaging/debian# cp openser.init /etc init.d/openser; cd 99 debian:~# update-rc.d openser defaults openser.cfg #fork=no openser /etc/init.d : debian:~# chmod 755 /etc/init.d/openser : debian:~# nano /etc/init.d/openser : DAEMON=/usr/sbin/openser : DAEMON=/sbin/openser

/

: "" OPENSER

openser /etc/default : debian:~# nano /etc/default/openser : RUN_OPENSER=yes 821=MEMORY USER=the_user_you_want GROUP=the_group_you_want OPENSER ps : debian:~# ps aux | grep openser . : OPENSER : " !". : ! " " OPENSER OPENSER OPENSER !. !. . !. " " OPENSER External Modules OPENSER : OPENSER MySQL mysql.so MySQL OPENSER Module .OPENSER : External Modules . : New External Module OPENSER : OPENSER OPENSER External Module OPENSER openser.cfg OPENSER OPENSER . OPENSER openser.cfg OPENSER openser.cfg .

: "" OPENSER

/

OPENSER openser.cfg OPENSER OPENSER . SIP_DOMAIN OPENSER : 'debian:~# export SIP_DOMAIN='localhost : export SIP_DOMAIN export bashrc home directory : debian:~# nano ~/.bashrc :

'export SIP_DOMAIN='localhost or mydomain.domain.com echo : 'echo "export SIP_DOMAIN='localhost " >> ~/.bashrc export SIP_DOMAIN . : localho ).(WAN

: OPENSER with MySQL Support MySQL OPENSER OPENSER .openser_mysql.sh : : root : "debian:~# mysqladmin -u root password "any_pass : OPENSER openser_mysql.sh /sbin : debian:~# cd /sbin debian:/sbin# openser_mysql.sh create

/

OPENSER : ""

: MySQL password for root: creating database openser... Core OpenSER tables succesfully created. Install presence related tables ?(y/n):y creating presence tables into openser... Presence tables succesfully created. Install extra tables - imc,cpl,siptrace,domainpolicy ?(y/n):y creating extra tables into openser... Extra tables succesfully created. Install SERWEB related tables ?(y/n):y Domain (realm) for the default user 'admin': localhost creating serweb tables into openser... SERWEB tables succesfully created. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! ! WARNING ! ! ! ! There was a default admin user created: ! ! username: admin@localhost ! password: openserrw ! ! ! Please change this password or remove this user! ! from the subscriber and admin_privileges table.! ! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! openser.cfg OPENSER : : /etc/openser/openser.cfg : MySQL debian:~# cd /etc/openser; wget http://muhammad.akl.googlepages.com/authmysql.cfg :openser.cfg auth-mysql.cfg debian:/etc/openser# cp auth-mysql.cfg openser.cfg : openser.cfg debian:/etc/openser# nano openser.cfg

: "" OPENSER

/

: =listen IP . : { ))"if (!www_authorize("", "subscriber ;)"0" ,""(www_challenge public

"" localhost

domain :

{ ))"if (!www_authorize("localhost or yourdomain.domain.com", "subscriber ;)"0" ,"www_challenge("localhost or yourdomain.domain.com _SIP DOMAIN . : openserctlrc /etc/openser : debian:/etc/openser# nano openserctlrc : debian:/etc/openser# wget http://muhammad.akl.googlepages.com/openserctlrc 1. . openserctlrc : debian:/etc/openser# cp openserctlrc.1 openserctlrc SIP_DOMAIN

openserctl :

debian:~# openserctl add 1000 1000 1000@localhost : : .... .

/

: "" OPENSER

: .openserrw : ekiga Debian GNU/linux Ubuntu : Application => Internet => Ekiga Softphone .Cancel Edit .Accounts Add : = Account Name Protocol = SIP = Registrar = User = Password = Authentication login IP xxx.xxx.xxx.xxx " " !. : [email protected] .

/

/ : . / / .

: "" WinZip "" . zip "" "" .Debian : "" : . . . root : # apt-get install zip # apt-get install unzip " " Red Hat: "" Fedora :yum # yum install zip # yum install unzip :zip . :unzip .zip

: :zip- data.zip .

* $ zip data $

: . zip . - ) (. * zip -r data

/

: /

$ unzip

pics.zip

) ( :unzip- pics.zip . - pics.zip . - cv.doc .pics.zip - /.tmp - pics.zip . : Wild Card :-

$ unzip -tq pics.zip $ unzip pics.zip $ unzip pics.zip cv.doc -d /tmp

$ unzip -l pics.zip

'$ unzip '*.zip : *. zip .wild card characte : ): Shell for loop (long version $ for z in *.zip; do unzip $z; done Linux :Unix : unzip package.zip unzip package.zip ) package (. : /opt : unzip zip -MS .DOS -d : }unzip {.zip-le-name}-d {/path/to/extract : package.zip /:opt # unzip package.zip -d /opt # cd /opt # ls # mv package newname :

: :Short Version

: /

/

gz tar: gz : gzip / gunzip . :gz $ gunzip le.gz $ gzip -d le.gz GNU/Linux z : $ tar xvzf le.tar.gz $ tar xvzf le.tgz : UNIX/Linux : UNIX/Linux . . tar UNIX/Linux : . . : tar -zcvf ArchiveName.tar.gz DirectoryName : :z gzip :c :v :f /home/jerry/prog : :

: $ tar -zcvf prog-1-jan-2005.tar.gz /home/jerry/prog prog-1-jan-2005.tar.gz ) (: $ tar -zxvf prog-1-jan-2005.tar.gz : :x /tmp : $ tar -zxvf prog-1-jan-2005.tar.gz -C /tmp $ cd /tmp - $ ls

/

: /

: tarball Linux UNIX Tape

0/dev/st

: tar : tar tar tar tar /tmp xvf /dev/st0 lename xvf /dev/st0 directory-name xvf mytar.ball.tar lename -zxvf mytar.ball.tar.gz directory-name

:

tar -zxvf mytar.ball.tar.gz -C /tmp lename tar -zxvf mytar.ball.tar.gz -C /tmp dir-name : man tar

rar: rar UNIX Linux : unrar : # apt-get install unrar Debian . # yum install unrar RedHat :

: # pkg_add -v -r unrar Binary Package rarlab : $ cd /tmp $ wget http://www.rarlab.com/rar/rarlinux-3.6.0.tar.gz : $ tar -zxvf rarlinux-3.6.0.tar.gz rar : $ cd rar $ ./unrar

:/bin# cp rar unrar /bin :

: /

/

:unrar$ unrar le.rar $ unrar l le.rar $ unrar x le.rar $ unrar t le.rar . rar : . ) (l :rar . ):(x . ) (t :

. . :KDE ArK : Application > Accessories <

.:GNOME File Roller .

/

"" "" "": "" "" . .www

) SWIG Simplied Wrapper and Interface "" :

(swig.org

"" ) Cython (www.cython.org SWIG "" Compile . "" Cython "" "" )(. "" "" : int char .pointers "": "" bindings header les "". "" .pyrex . "" "" "". "" "". "" rand "" stdlib.h "". man 3 rand rand "" : >#include #include #include #include >> import myrand >>> help(myrand) Help on module myrand: NAME myrand FILE /home/alsadi/cython/myrand.so FUNCTIONS rand_mean(...) return the mean of 1000 numbers between 1-6 >>> myrand.rand_mean() 3.4159999999999999

" : "" "" "

/

header le "" . "" myrand ." "" " python myrand.so "". Makele setup.py : "" [alsadi@ojuba cython]$ python -c "from distutils.syscong import get_python_ lib; print get_python_lib(1)" /usr/lib/python2.5/site-packages prototypes "" def cdef

- ITL "" :" "ITL . SWIG # iprayer.pyx # -*- coding: utf-8 -*""" Copyright (c) 2008 Muayyad Saleh Alsadi Released under terms on Waqf Public License. This program is free software; you can redistribute it and/or modify it under the terms of the latest version Waqf Public License as published by Ojuba.org. """ cdef extern from "itl/prayer.h": # data types ctypedef struct Date: int day,month,year ctypedef struct Location: double degreeLong, degreeLat, gmtDiff, int dst, double seaLevel, pressure, temperature ctypedef struct Method: double fajrAng,ishaaAng,imsaakAng, int fajrInv,ishaaInv,imsaakInv,round,mathhab, double nearestLat, int extreme, offset double offList[6] ctypedef struct Prayer: int hour,minute,second,isExtreme >

/

" : "" "" "

# functions void getPrayerTimes (Location*, Method*, Date*, Prayer*) double getNorthQibla(Location*) void getMethod(int , Method*) import time import os import os.path def get_iprayers(date=None): """takes a date type (YYYY,MM,DD) wich defaults to the current day, and return a list of 6 tuples like (HH,MM,SS,isDST, isExtreme) for the 5 daily prayers and sunrise time""" cdef Location l cdef Date d cdef Method m cdef Prayer p[6] if date==None: date=time.localtime()[0:3]; t=time.mktime(date+(12,0,0,0,0,0)) d.year,d.month,d.day=date datestring="%04d%02d%02d" % date # Mekka settings l.degreeLong=39.82 l.degreeLat=21.43 l.seaLevel=298 l.gmtDiff=3 getMethod(6, &m) m.mathhab=1 m.extreme=5 l.dst=0 getPrayerTimes (&l, &m, &d, p) r=[(p[i].hour,p[i].minute,p[i].second,self.__conf['DST'],p[i].isExtreme) for i in range(6)] return r

. itl/prayer.h ITL .Cython get_iprayers . ...

" : "" "" "

/

point . "" .& .cython iprayer.py "" "" .linking errors . setup.py . # setup.py from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext ext = Extension( "iprayer", # name of extension ["iprayer.pyx"], # lename of our Pyrex/Cython source language="c", # this causes Pyrex/Cython to create C++ source #include_dirs=[...], # usual stuff libraries=['itl'], # ditto #extra_link_args=[...], # if needed cmdclass = {'build_ext': build_ext} ) setup( name = 'iprayer', cmdclass = {'build_ext': build_ext}, ext_modules = [ext], ) ."- "litl libraries=['itl']

/

Inkspace ImageMagick FFmpeg: GIMP Animation Package GAP . . .

: Inkspace . .Inkspace ImageMagick Suite . FFmpeg . / : BSD Solaris .

Inkspace . - . . ) X Y (. , , . . :

: Inkspace ImageMagick FFmpeg

/

Export " "animation . ""

: File > Export bitmap Selection Browse - ""animation - ""0.png .Export

.""0.png

. . . Import . :

!. . ) Edit paths by node

2.(F "" - - : .

/

: Inkspace ImageMagick FFmpeg

. . . . " "2.png .

" "3.png... . . Inkspace .

Export bitmap . Export . . Inkspace :

. :

: Object > Fill and Stroke Opacity - - . : "."linuxac " "l " "li " "lin " "linu... :

: Inkspace ImageMagick FFmpeg

/

. . . : Terminal ""animation : $ cd animation .ImageMagick : animate -coalesce -delay 9 0.png 1.png 2.png 3.png 4.png 5.png 6.png 7.png 8.png 9.png 10.png 11.png 12.png 13.png 14.png 15.png 16.png 16.png 16.png 16.png 16.png 17.png 18.png 19.png 20.png 21.png 22.png 23.png 24.png 25.png 26.png 27.png 28.png 29.png 30.png 31.png 32.png 32.png 32.png 32.png 32.png 32.png 32.png 32.png 32.png 32.png : coalesce . : delay . : "". . " "0.png " "xx.png "" . : ". "png ". "png . . . :GIF .ImageMagick

/

: Inkspace ImageMagick FFmpeg

Animate Save Format . GIF .Select " "linuxac " ".gif Save GIF .

. convert GIF JPEG FFmpeg . GIF . : $ convert linuxac.gif linuxac%05d.jpg FFmpeg . " "linuxac : $ ffmpeg -r 12 -i linuxac%05d.jpg -y -an linuxac.avi . .

/

:

/ . Access Point AP AP .Router : . . AP BandWidth . !. Google . . : . . . . . " ". . Bandwidth . . . : . . ) ...( .

/

:

Activity Streaming .!YouTube WEP : // . . . Service Set ID SSID! Spoof MAC Address . . AP AP . : . SSID SSID AP . Privacy. . SSID Broadcast AP SSID. SSID : .kismet . .Access Point AP . . . Encryption WEP . WPA-PSK .TKIP TKIP Passphrase // ) ( . WEP passphrase Brute Force. Brute Force: coWPAtty .aircrack

:

/

. MAC Address Filtering AP MAC Address . MAC Address MAC Address MAC Address . Spoof . MAC Address Spoong Intrusion Detection System ) (AP .MAC Address Spoong

. Static IP MAC Address AP . . . AP AP / . AP /. . . . . . !. . . . . .

/

Rootkit:

. Rootkit .

Rootkit Rootkit .Client

Rootkit Rootkit ) ( "" . Rootkit . Rootkit 1.1.4 .Sun OS : .netstat Rootkit Sony BMG Rootkit . "" Rootkit.

Rootkit.) Binary Rootkits(: Binary Rootkit : / /bin/login .network daemons Rootkit . Rootkit ) (tar Archives . .:Kernel Rootkits . Kernel Rootkit "" )( "" )( " " BSD )(. : Drivers .

: Rootkit

/

: 8 T0rn libproc.a Kernel Space Utilities /./bin/ps .libproc.a : /./proc .:Firmware Rootkits Device Platform Firmware . Code Integrity .:Virtualized Rootkits . rootkit .

.Library Trojan Kits 8. T0rn

.) Library Kits (:

Rootkit Rootkit : Root Kit Hunter .chkRootkit . :Root Kit Hunter ) (Script Rootkits Server . Rootkits . Sourceforge.net Synaptic rkhunter .Synaptic Root Kit Hunter "" : Terminal root Donwload : wget http://downloads.Rootkit.nl/rkhunter-1.2.7.tar.gz : tar -zxvf rkhunter-1.2.7.tar.gz : 7.2.1-cd rkhunter : ./install.sh Scan : rkhunter -c : rkhunter update

/

: Rootkit

. :ChkRootkit . Root Kit Hunter Synaptic .chkRootkit chkRootkit . chkRootkit -h chkRootkit -l chkRootkit chkRootkit -x : : : "" :x Root Kit Hunter ChkRootkit Rootkits "".

Rootkit Rootkit : Rootkit: Rootkit . Rootkit . : Rootkit . - -Rootkit )(.

Rootkits Rootkits . : )(: .

: Rootkit

/

: . : . . VPNS :Secure Shell VPNS . ssh Telnet . : . . : . logwatch .logsentry Rootkit : . . Rootkit . : Flag . " ": " " . " " " "chattr "". > chattr +i chattr -i lsattr Outils > Outils systme > Congurer votre ordinateur > Scurit > Congurer le niveau de scurit du systme et l'audit de scurit

:

.root draksec .Enter . .Options de Base MSEC Aide Help.

MSEC :drakperm MSEC . : root .drakperm :

Menu > Outils > Outils systme > Congurer votre ordinateur > Scurit > Ajuster nement les permissions du systme

) ( .

/

: MSEC ""

> Menu > Outils > Outils systme > Congurer votre ordinateur > Scurit Congurer le niveau de scurit du systme et l'audit de scurit > Options systme .Masque de permissions pour la cration de chier par les utilisateurs .Masque de permissions pour la cration de chier par root Aide Help :

:umask MSEC umask :

root umask .umask ) (. MSEC . MSEC ""BIENVENUE AU PIRATES : " " ... . : " ". draksec . "" : : " ". : ) (. : "". : MSEC . .

: MSEC ""

/

: "". . ) .(ssh ftb . : " ". . . .root MSEC . : " " " "paranoid " "Paranoaque. . .

"" . : MSEC : 2 [root@ordi ~]# msec : "" . . : : : : : : : : [root@ordi ~]# msec -o log=stderr 4 2> 3_to_4.msec : :

Menu > Outils > Outils systme > Congurer votre ordinateur > Scurit > Congurer le niveau de scurit du systme et l'audit de l'ordinateur

niveau de securit . :

Options rseau Options systme Vrications priodiques

/

: MSEC ""

MSEC .

> Menu > Outils > Outils systme > Congurer votre ordinateur > Scurit Congurer le niveau de scurit du systme et l'audit de l'ordinateur

:

: draksec .

MSEC : /etc/syscong/msec /var/lib/msec/security.conf MSEC . :

: ]6-0[./usr/share/msec/level : ]6-0[./usr/share/msec/perm

/etc/syscong/msec ) Shell Scripts ( : /etc/prole.d/msec.sh /etc/bashrc /etc/prole /lib/msec/security.conf /etc/security/msec/security.conf Shell .CHECK_SECURITY

:

: MSEC .

: MSEC ""

/

:CHECK_PASSWD MSEC . :CHECK_PERMS MSEC . MSEC : :

.bashrc .bash_prole .bash_login .bash_logout .cshrc .emacs .exrc .forward .klogin .login .logout .prole .tcshrc .fvwmrc .inputrc .kshrc .nexrc .screenrc .ssh .ssh/cong .ssh/authorized_keys .ssh/environment .ssh/known_hosts .ssh/rc .twmrc .xsession .xinitrc .Xdefaults

_.netrc .rhosts .shosts .Xauthority .gnupg/secring.gpg .pgp/secring.pgp .ssh/identity .ssh/id_dsa .ssh/id rsa .ssh/random_seed

:

.

:CHECK_PROMISC MSEC _._promiscuous IP : .PACKET SNIFFER :CHECK_SECURITY MSEC :

/usr/share/msec/security_check.sh _CHECK .

:CHECK_SGID MSEC md _bit _sgid _bit _sgid . :CHECK_SHADOW MSEC Control Integrity : /etc/shadow 5:CHECK_SUID_MD MSEC md _bit _suid _bit _suid .

/

: MSEC ""

:CHECK_SUID_ROOT MSEC _bit _suid . :CHECK_WRITABLE MSEC . :CHKROOTKIT_CHECK MSEC .RootKits :MAIL_EMPTY_CONTENT MSEC Crackers . :MAIL_USER . . ADMINISTRATEUR SECURITY OPTION DE BASE " " . :MAIL_WARN .MAIL_USER :PERM_LEVEL . MSEC : /usr/share/msec/perm.$PERM_LEVEL .SECURE_LEVEL /etc/security/msec/perm.local . :SYSLOG_WARN MSEC .syslog :RPM_CHECK Hibernal Mode " ". .

/

" " . . . Amazon.com :

: - - EXp1r3d : - - amena : - - IraqiMousl .

.

/

:GreyHunter alsadi Al AnWar raoudha bob-work Free-Programmer B!n@ry GreyHunter : : : :

EXp1r3d knoppix_dark