Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5976715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:16:04+00:00 2026-05-22T21:16:04+00:00

if kernel32.dll is guaranteed to loaded into a process virtual memory,why couldn’t i call

  • 0

if kernel32.dll is guaranteed to loaded into a process virtual memory,why couldn’t i call function such as Sleep without including windows.h?
the below is an excerpt quoting from vividmachine.com

5. So, what about windows? How do I find the addresses of my needed DLL functions? Don’t these addresses change with every service pack upgrade?

There are multitudes of ways to find the addresses of the functions that you need to use in your shellcode. There are two methods for addressing functions; you can find the desired function at runtime or use hard coded addresses. This tutorial will mostly discuss the hard coded method. The only DLL that is guaranteed to be mapped into the shellcode’s address space is kernel32.dll. This DLL will hold LoadLibrary and GetProcAddress, the two functions needed to obtain any functions address that can be mapped into the exploits process space. There is a problem with this method though, the address offsets will change with every new release of Windows (service packs, patches etc.). So, if you use this method your shellcode will ONLY work for a specific version of Windows. Further dynamic addressing will be referenced at the end of the paper in the Further Reading section.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T21:16:05+00:00Added an answer on May 22, 2026 at 9:16 pm

    The article you quoted focuses on getting the address of the function. You still need the function prototype of the function (which doesn’t change across versions), in order to generate the code for calling the function – with appropriate handling of input and output arguments, register values, and stack.

    The windows.h header provides the function prototype that you wish to call to the C/C++ compiler, so that the code for calling the function (the passing of arguments via register or stack, and getting the function’s return value) can be generated.

    After knowing the function prototype by reading windows.h, a skillful assembly programmer may also be able to write the assembly code to call the Sleep function. Together with the function’s address, these are all you need to make the function call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want figure out the call sequence and functions to kernel32.dll in a function
I wrote this function to inject DLL into running process: DLL_Results CDLL_Loader::InjectDll() { DWORD
I would like to declare an external function from the kernel32.dll library whose name
If I have a function foo() that windows has implemented in kernel32.dll and it
I want to use the GetFileInformationByHandle function under kernel32.dll in order to get the
I am trying to call OpenEvent of kernel32.dll using JNA and it fails with
I am trying to hook a function to cmd.exe process the dll is injected
The ReadProcessMemory function of kernel32.dll appears to be returning Unicode. kernel32 = ctypes.windll.kernel32 PROCESS_QUERY_INFORMATION
I am trying to access the GetProcAddress function in the kernel32.dll from my C#
When I am trying to reload the symbol for kernel32.dll, the windbg always complain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.