How to bypass security check while opening a file?

Discussion in 'Win32' started by unmeshjoshi, Mar 17, 2010.

  1. unmeshjoshi

    unmeshjoshi New Member

    Joined:
    Mar 17, 2010
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    I want to open a file using say open API or CreateFile API like:

    hDevice = CreateFile((_T("\\\\.\\C:")),GENERIC_READ, FILE_SHARE_READ ,NULL, OPEN_EXISTING,0,NULL);

    If this call fails due to security check, What can we do to bypass the security check?
    As I just want to read the file, I may be given the access to the file, which might already be opened in WRITE mode.
     
  2. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    2
    Trophy Points:
    0
    You will not be able to bypass the security check because you are using the API library which enforces security on you by default.
     
  3. unmeshjoshi

    unmeshjoshi New Member

    Joined:
    Mar 17, 2010
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    In that case, will INLINE ASSEMBLY help me out?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice