Linux for hacker:Igice cya kabiri

... by crook in Dev Ops 605

Mu gice cyambere, twarebeye hamwe ibyerekeye File system, cd cyangwa guhindura directory wakoreragamo n’ibindi byose by'ibanze.

Muburyo bwinshi uburyo bw'ibanze kugira ngo ubashe kuba umu white hat Hacker nuko ugomba kwimenyereza gukoresha command line interface(CLI) cyane.

Aka gace tugiye kurebera hamwe uko Wabasha gukoresha commands n’ibindi bikenerwa mu rugendo rwa hacking.

Akenshi na kenshi aba hacker bagitangira(beginners) baba bibaza uburyo babonamo ibintu nk'ama command amwe n'amwe kubera ko abenshi baba bamaze igihe kinini bikoreshereza windows Operating System cyangwa OSX kugira ngo babashe kubona commands zikunze gukoreshwa muri Hackings bikabagora.

Ushobora kuba wibaza uti ese ni gute namenya aho ibyo nshaka gukoresha byose biherereye ni ukuvuga ko ushobora kwifashisha command line ukaba wabona aho ama command amwe n'amwe abitse urugero nka directory, binaries, config files, n'ibindi aho byaba biherereye.

Uyu munsi rero tugiye kurebera hamwe uko twakoresha Terminal (command line ) kugira ngo turebe ko twabona aho andi ma commands abitse. Tudatinze mu magambo rero reka dutangirire kuri command yitwa Locate.

1. Locate

Linux ifite uburyo bwinshi ushobora gukoresha kugira ngo ubashe kuba wabona porogaramu runaka, commande, ama files n’ibindi wifashishije uburyo bworoshye bwa command line.

Uburyo bwa mbere bukunze gukoreshwa cyangwa wakoresha ni ugukoresha command yitwa Locate.

Locate ikoreshwa ikurikiranye n’ijambo ushaka gushaka (keyword) icyo iyi command ikora ibasha gushakisha muri file system ishakamo iryo jambo uyihaye aho riherereye.

Uko ikoreshwa ufungura terminal nk'uko twabibonye mu gice cyambere.

Andika locate ukurikizeho ijambo cyangwa command ushaka kumenya aho riherereye ubundi ukande Enter.


2. whereis

Niba tuzi neza icyo turigushaka ko ari binary (bihuye na executable muri window Os), Linux ifite commands zihariye ushobora gukoresha muri ayo ma commande harimo  whereis.

Whereis command ntabwo izakuzanira gusa aho binary ushaka iherereye ahubwo izanakwereka uko wayikoresha ikuzanira man page twabonye mu gace kambere.

1. kali>whereis aircrack-ng

2. Kali>whereis msfconsole

Aha izakwereka aho msfconsole Iherereye: /usr/bin/msfconsole /usr/share/man/man1/msfconsole.1.gz


Nk'uko ubibona kuri iyi foto iri haruguru  dukoresheje whereis  twabonya aho binary yitwa aircrack-ng iherereye, ariko aha nuyikoresha urimo gushaka document runaka ntabwo uzabasha kuyibona kubera ko ikoreshwa mu gushaka ama binaries n'andi ma command gusa.

3. which

Which yo irihariye kuko yo yerekana aho commande runaka iherereye.

1. Kali>which aircrack-ng 

2. Kali>which msfconsole



4. FIND

FIND ni command ikunze gukoreshwa cyane kubera uburyo  yoroshya uburyo umuntu ashaka ibintu. Commande ya find ifite ubushobozi bwo gushaka file cyangwa binary muri directory runaka ikanashakisha ayo ma file cyangwa ama binaries yifashishije amwe mu ma parameters harimo nk'izina rya file n’ibindi. Ibi bikurikira nibyo ishobora kukwereka.

1. Igihe yaba yarakorewe (created) cyangwa yaba yarahinduriwe(modified)

2. Nyirayo

3. Permission

4. Ingano yiyo file cyangwa folder(size)

5. Group

Uburyo wakoresha find ni ubu:

Andika Find <ukurikizeho directory ushaka ko ishakiramo> <options> <expression>

Niba ushaka nko gushaka file ibitse kuri root (/)  ifite izina rya apache2 wakoresha iyi commmand:

1. Kali>find / -type  f -name apache2

2. kali>find /root/Desktop f –name izina rya file ushaka

/:ni directory iri bushakiremo
Ushobora gusimbuza / n'ahandi hantu ushaka gushakira. Urugero, ushobora gushyiraho usr,share,lib.

-type: ni type ya file aha ni ukugaragaza ko -f bivuzeko ari file isanzwe

-name: irashakisha igendeye ku izina apache2 ni ukuvuga izina ishaka.



Nk'uko ubibona command ya find yatangiriye aho file system itangirira igenda ishakisha muri buri directory yose ishakamo ijambo apache2 aho riherereye, ikaba yabonye ahantu henshi hari apache2, bikaba byatuma iyi commande igenda gake ni ukuvuga ko kubona icyo dushaka kubera ko find igenda ishakisha muri buri directory.

Reka turebe igihe tuzaba dushaka apache2 iherereye muri /etc directory.

Kuri ubu buryo tuzatangira gushaka duhereye kuri /etc directory. Icyo find izakora izareba muri iyo directory nirangiza ihite iduha igisubizo kijyanye n'ibyo twasabye.

Kali>find /etc -type  f -name apache2


Nk'uko ubibona haruguru ubu nibwo buryo bwihuse kurusha ubwabanje aha yerekana aho apache2 iri n'ama subdirectory iherereyemo muri /etc directory. find aho itandukaniye n'andi macommand twabonye haruguru nka Locate ,Whereis yo ni uko itwereka neza aho file dushaka iherereye mu buryo bwihuse.

Mugihe muri folder urimo gushakiramo harimo andi ma files afite izina rijya gusa n'iryo ushaka cyangwa ushaka kureba ama files yose yifitemo izina ushaka wakoresha iyi commande ikurikira:

Kali>find /etc -type  f -name ‘apache2.*’


5. grep

Mu gihe urimo gukoresha command line ushobora gushaka keyword runaka. Commande ya grep yo ni filter kugira ngo ishake keyword runaka. Ikoreshwa rimwe na rimwe iyo output yatanzwe na command runaka ushaka kuyishyira muyindi commande ibyo bita (piping) ushobora guhita wibaza uti ese piping ni iki? piping ni uburyo ufata output ya command runaka ukaba wayikoresha muyindi command. Kugira ngo dukore piping twifashisha | ako karongo nk'urugero nshobora kuba nshaka kureba process zirimo ku running nkoresheje commande ya ps ikurikiwe na aux switch:

Uko yandikwa: kali >ps aux


Uko ubibona haruguru iyi commande impa ama services arimo ku running muri system. None se mugihe ushaka kureba service imwe irimo ku running uyikuye muri aya ma services arimo ku running wakora iki?

Ushobora kwifashisha piping ufata output wabonye wufashishije ps aux ukayijyana muri grep Wenda nshaka kurebako apache2 services irimo gukora(running).

Nakwandika kali>ps aux | grep apache2

Iyi commande yerekana ama services arimo ku running yarangiza ikohereza output kuri grep aho grep izashakamo keyword wabashije kuyiha ariyo apache2 hano twakoresheje yarangiza ikaduha output.


Uko ubibona haruguru grep yabashije gukora filter ikuramo keyword twayihaye iba ariyo itwereka yonyine ikaba idufasha mu kudatakaza igihe burigihe dukora scan y'ama services arimo kurunning.

Niba ushaka kuba white hat hacker cyangwa ufite mugenzi wawe ubishaka kora share.

Hari ikibazo cyangwa igitekerezo ushaka kutugezaho watwandikira ahagenewe ibitekerezo cyangwa kuri page yacu ya facebook ktimez.com tukabasha kugufasha.



Comments

Write your comment

Ndabaga Micheal

@crook
...

About me

I am a software engineer with extensive experience and author and works for a ktimez.com

Software Development

Want a Software ?

Here at Ktimez Inc we have qualified programmers that can develop a great web based,desktop and mobile(Androi&IOS) apps for you.

Hire Us

Learn Programming With Us

Want To Improve in your Programming Skills?

Here at Ktimez Inc we have qualified programmers that can teach you every language you are willing to know.

Hire Us

IT and Computer Traings

Software And IT Home Training

You like our daily ICT and Tech news? Hire us, we have a lot of engineers and qualified and skilled IT specialist to train you wherever you are.

Hire us

Copyright © Ktimez.com 2017