Questions tagged [virtualalloc]

64 questions
0
votes
1 answer

Shellcode from vector into virtualalloc does not work

I am having a hard time figuring out why the payload isn't working after decryption in example2.cpp, when executing the compiled exe with the command 'example2.exe > out.txt' I get the shellcode which is valid and does not cause any problem in…
loaded_dypper
  • 262
  • 3
  • 12
0
votes
2 answers

string input not printed correctly on the screen

I am trying to read in a string from the user input and then print it on screen. However, when the string is printed on the console, it is kind of gibberish. The funny thing is that it works in Visual Studio and not in CodeBlocks. #include…
nab saw
  • 15
  • 3
0
votes
0 answers

allocate contiguous pages of memory using virtualalloc

I was searching for a solution to a problem which I found in another post. This code was posted Jerry Coffin. However, I have difficulty in understanding the "show_page()" and the "alloc_page" functions. #include #include…
nab saw
  • 15
  • 3
0
votes
0 answers

Why does the Virtualallocex function exist?

It seems to me that it's a major security vulnerability, seeing as it can edit the memory of other processes. So, why does the Virtualallocex function exist?
user14831455
0
votes
0 answers

VirtualAlloc with specified address failed on MEM_FREE memory?

I want to allocate memory on specified address but failed. -> GetLastError()=487, Attempt to access invalid address. VirtualAlloc((void*)from, len, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); My program will call this many times, some are…
blackshadow
  • 77
  • 1
  • 4
0
votes
1 answer

problem with virtualalloc

virtualpointer=(char*) VirtualAlloc (NULL, (unsigned __int64) (1<<31), MEM_RESERVE, PAGE_READWRITE); mainhashbuf=progression=virtualpointer; VirtualAlloc (progression, (unsigned __int64) (1<<15), MEM_COMMIT,…
Jake
  • 2,877
  • 8
  • 43
  • 62
0
votes
0 answers

VirtualAlloc() working on certain memory addresses but not others

I'm running a program called VMdriver5.exe (left side of image I attached), that creates a process of another program called VMmapper.exe. Inside the VMdriver5.c code, it gets its PID (using GetCurrentProcessId()) and passes it's PID to VMmapper.exe…
ennth
  • 1,698
  • 5
  • 31
  • 63
0
votes
1 answer

VirtualAlloc failed

I want to set my own ImageBase to 0x2000000, and then read another EXE program to its ImageBase, of course, usually 0x400000, but when I use VirtualAlloc to apply for space, it always fails, GetLastError is 0x1e7 (487), Of course, I also tried to…
Boom爆
  • 1
  • 1
0
votes
1 answer

Loading DLL to user defined address

How to load the DLL into user define memory address or is it possible to change the DLL address after loading the DLL using loadlibrary() function. I have tried using VirtualAllocEx() to allocate the memory address and load DLL to the remote…
redumpt
  • 167
  • 13
0
votes
1 answer

Is allocating arrays of atomics using virtual memory system calls safe?

I am developing an in-memory database, and my system needs a large array of std::atomic_int objects that roughly act as locks for database records. Now I would prefer to allocate these locks using VM system calls such as mmap on Unix-like systems…
Boris
  • 57
  • 1
  • 9
0
votes
1 answer

Installing Puma on windows VirtualAlloc pointer is null

I did check the other issues and majority had problems with OpenSSL. I did try the solutions other mentioned with installing the OpenSSL but it didn't help. I am getting the following error message when trying to install the Puma by gem install…
Suthan Bala
  • 3,209
  • 5
  • 34
  • 59
0
votes
1 answer

`VirtualAllocEx` returns same address when specifying different start addresses?

I'm trying to bring calc.exe to show a messagebox, but calc.exe always crashes as soon as I execute my program. So I tried to inject the code to my own process in order to see debugging messages. Doing so gives me the exception "Access violation…
Cubi73
  • 1,891
  • 3
  • 31
  • 52
0
votes
2 answers

Can't VirtualAlloc on free region returned by VirtualQuery

I am trying to allocate a certain amount of memory within some memory range in a DLL that gets loaded within a Windows Application. The way I am doing it, is using VirtualQuery() to search for a region of memory that is marked as free and is within…
elventear
  • 341
  • 1
  • 4
  • 10
0
votes
1 answer

VirtualAlloc - allocating space for big files

I am currently trying to rewrite Binary Diff to support bigger files, as using GetMem for reading files limits the file size (I suppose) and I am not able to read 2 files with a size of 900 MB each. So I figured, I could use VirtualAlloc, which…
trsx
  • 3
  • 4
0
votes
0 answers

VirtualAllocEx force allocate pages

MSDN documentation says that VirtualAllocEx Actual physical pages are not allocated unless/until the virtual addresses are actually accessed. I need to acces the physical address right after calling VirtualAllocEx yet i cant cause they are not…
user3575889
  • 271
  • 1
  • 8