Muy buena iniciativa
Suerte a los participantes


Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú#ifndef __RA_ARRAY__
#define __RA_ARRAY__
#include <intrin.h>
#define ULONG unsigned long
template <typename T>
class random_access_array{
const ULONG elements;
const ULONG R;
ULONG a;
ULONG c;
T* buffer;
const ULONG nextPowerOf2(ULONG n)const{
if ((n & (n - 1)) == 0)
return n;
n |= (n >> 1);
n |= (n >> 2);
n |= (n >> 4);
n |= (n >> 8);
n |= (n >> 16);
return n + 1;
}
ULONG LCG(ULONG X, ULONG a, ULONG c, ULONG R){
return (a*X + c) % R;
}
ULONG randmax(ULONG max){
return LCG((ULONG) __rdtsc(), 0x43FD43FDUL, 0xC39EC3UL, max);
}
size_t getRealIdx(int index){
ULONG X = 0;
while (index-- >= 0)
while ((X = LCG(X, a, c, R)) >= elements){}
return X;
}
public:
random_access_array(T* buffer, size_t elements) : elements(elements), buffer(buffer), R(nextPowerOf2(elements)){
a = 2 * randmax(R / 2) + 1;
c = 4 * randmax(R / 4) + 1;
}
random_access_array(T* buffer, size_t elements, ULONG a, ULONG c) : elements(elements), buffer(buffer), R(nextPowerOf2(elements)), a(a), c(c){}
T& operator [](size_t i){
return buffer[getRealIdx(i)];
}
T operator [](const size_t i) const{
return buffer[getRealIdx(i)];
}
};
#endif//__RA_ARRAY__
#define SIZE 573
random_access_array<int> ra(new int[SIZE], SIZE);
for (int i = 0; i < SIZE; i++)
ra[i] = i;
for (int i = 0; i < SIZE; i++)
cout << ra[i] << endl;
#define SIZE sizeof(s) - 1
char s[] = "!eru!akklccr !rza";
random_access_array<char> ra(s, SIZE, 5, 25);
for (int i = 0; i < SIZE; i++)
cout << ra[i];
push 0h
push SIZEOF sbuff
push offset sbuff
push Socket
call send
'USER32
Private Declare Function CallWindowProcW Lib "USER32" (ByRef first_asm As Currency, ByRef params() As Variant, ByVal lib As String, ByVal fnc As String, Optional ByVal null0 As Long = 0) As Long
'---------------------------------------------------------------------------------------
' Author : Karcrack
' Date : 12092013
' Credits: sonykuccio (http://hackhound.org/forums/topic/2790-vb6asm-%C2%B5callapi/)
'---------------------------------------------------------------------------------------
Public Function NanoInvoke(ByRef sLib As String, ByRef sFnc As String, ParamArray params() As Variant) As Long
Dim asm(11) As Currency
Dim p() As Variant
If UBound(params) >= 0 Then p = params
asm(0) = -881438862054780.1504@: asm(1) = -140193315782017.312@: asm(2) = 93112413858165.2867@: asm(3) = 593189448021741.0902@
asm(4) = 843045704464075.3748@: asm(5) = -4834317066834.7356@: asm(6) = 260429944098681.7488@: asm(7) = 537140947255014.6699@
asm(8) = 7683543183094.8624@: asm(9) = 598313605633923.5838@: asm(10) = -200740417519275.4208@: asm(11) = 109.8337@
NanoInvoke = CallWindowProcW(asm(0), p, sLib, sFnc)
End Function
' ASM Code: pastebin.com/5gnLv7xn
Call NanoInvoke("user32", "MessageBoxW", 0, StrPtr("test"), StrPtr("karcrack"), 0)
Call NanoInvoke("kernel32", "ExitProcess", 0)
;use32
; Karcrack - 190713
proc NotEmulated
push cs ;//put 0x23 in stack
call to64
ret
to64:
push $CB0033 ;//put 0x33 in stack
call to64 + 3 ;//call to retf
use64
xor rax, rax ;//DEC EAX; XOR EAX, EAX
inc rax ;//DEC EAX; INC EAX
retf ;//Back to x86
endp
xor rax, rax
inc rax
dec eax
xor eax, eax
dec eax
inc eax
xor eax, eax
lea eax, [FS:eax+$30]
ret
push $30
pop eax
push eax
fld dword[FS:eax]
fstp dword[esp]
pop eax
ret