Linux For Hacker Part Two

Mu gice kambere, twarebeye hamwe kubyerekeye File system,cd  cyangwa guhindura directory wakoreragamo n’ibindi byose byibanze.

Muburyo bwinshi uburyo bwibanze kugirango 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 nka ma command amwe namwe  kuberako abenshi baba bamaze igihe kinini bikoreshereza window Operating System cyangwa OSX kugirango babashe kubona commande akunze gukoreshwa muri Hackings bikabagora.

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

Uyu munsi rero tugiye kurebera hamwe uko twakoresha Terminal (command line ) kugira turebeko twabona aho andi ma commands abitse .Tudatinze mumagambo rero reka dutangirire kuri command yitwa Locate.

 

1.Locate

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

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

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

Uko ikoreshwa fungura terminal nkuko twabibonye mugice cyambere.

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

2.whereis

Nimba tuzi neza icyo turigushaka ko ari binary (bihuye na executable muri window Os),Linux ifite commande 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 mugace 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

Nkuko ubibona kuri iyi foto twakoresheje whereis dukurikizaho binary yitwa aircrack-ng ,urabonako yahise itwereka neza aho aircrack-ng iherereye .

 

3 which

Which iyi yo irihariye.kuko yo yerekana aho commande runaka iherereye.

Kali>which aircrack-ng

Nkuko ubibona haruguru ,which yabashije kubona binary file imwe muri directory.

 

4.FIND

FIND ni command ikunzwe 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 muma parameters harimo nkizina rya file n’ibindi .Ibi bikurikira nibyo ishobora kukwe

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

2.kuri nyirayo

3.permission

4.size

5.group

Uburyo wakoresha find nubu:

Find <ugakurikizaho directory ushakako ishakiramo> <options> <expression>

Nimba ushaka nko gushaka file ibitse kuri root (/)  ifite izina rya apache2.wakoresha iyi commmande:

1.Kali>find / -type  f -name “.php”

Iyi command irakwereka ahantu hose wasanga file cyangwa document ifite extension ya .php

Nkuko ubibona command ya find yatangiriye aho file system itangirira igenda ishakisha muri buri directory yose ishakamo ijambo .php aho riherereye.

ikaba yabonye ahantu hensi hari .php.bikaba byatuma iyi commande igenda gake nukuvuga kubona icyo dushaka kuberako find igenda ishakisha muri buri directory .

reka turebe igihe tuzaba dushaka .php iherereye muri directory ya /var .

Urabonako itweretseko muri directory ya /var harimo file imwe ifite extension ya .php.

Ukaba wakoresha ubu buryo mugihe wibuka izina rya document yawe ariko utibuka ahantu iherereye find rero yahita yifashishwa mugushakisha iyo file .

 

5.grep

Mugihe urimo gukoresha command line ushobora gushaka keyword runaka. Commande ya grep yo ni filter kugira 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 niki ?? piping nuburyo ufata output ya command runaka ukaba wayikoresha muyindi command.kugira dukore piping twifashisha | ako karongo nkurugero 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 nginx

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

Uko ubibona haruguru grep yabashije gukora filter ikuramo keyword twayihaye iba ariyo itwereka yonyine ikaba idufasha mukudatakaza igihe burigihe dukora scans yama services arimo kurunning .

 

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

Hari ikibazo cyangwa igitekerezo ushaka kutugezaho watwandikira muri comment box cyangwa kuri page yacu ya facebook ktimez tukabasha kugufasha

 

 

 

 

 

 

 

Leave a Reply

Your email address will not be published.