DLL Injection Methods - Test Apps (Discussion)

Discussion in 'other software & services' started by WildByDesign, Feb 5, 2018.

  1. itman

    itman Registered Member

    Joined:
    Jun 22, 2010
    Posts:
    8,593
    Location:
    U.S.A.
     
  2. itman

    itman Registered Member

    Joined:
    Jun 22, 2010
    Posts:
    8,593
    Location:
    U.S.A.
    As far as Stealth Process Hollowing (via Hotswapping Maps) technique, a point to note:
    As such, it is only applicable to a limited number of Win processes.

    I also view this technique in the memory injection NOP category. Someone should test HMP-A and see if it detects the activity. Also Emsisoft since it monitors unknown processes for memory modification activities.
     
  3. Sampei Nihira

    Sampei Nihira Registered Member

    Joined:
    Apr 7, 2013
    Posts:
    3,365
    Location:
    Italy
    Also MBAE:

    https://forums.malwarebytes.com/topic/205865-malwarebytes-anti-exploit-112-build-68-released/
     
  4. Rasheed187

    Rasheed187 Registered Member

    Joined:
    Jul 10, 2004
    Posts:
    17,561
    Location:
    The Netherlands
    Good point, perhaps anti-exploit will detect it. About the Stackhackr discussion, I don't know why this guy is making such a big deal about it, he's being stupid. It's a simple leak-testing tool, obviously made to generate buzz.

    However, it does simulate behavior that should be blocked. Actually, I hope they will spice things up a bit, perhaps they can also add code-injection and process hollowing techniques. Not to forget about keylogging, perhaps done by PowerShell. See link for more info.

    https://www.barkly.com/how-stackhackr-works
     
  5. itman

    itman Registered Member

    Joined:
    Jun 22, 2010
    Posts:
    8,593
    Location:
    U.S.A.
    Makes me also reflect back on RanSim:
     
    Last edited: Apr 29, 2018
  6. Rasheed187

    Rasheed187 Registered Member

    Joined:
    Jul 10, 2004
    Posts:
    17,561
    Location:
    The Netherlands
    Forgot about RanSim, I've read that RansomFree failed all, and AppCheck passed all tests. But I've checked out the Barkly leak-tests, the first one fails when wscript.exe is blocked, but I couldn't block the second one, I guess it tries to read process memory from lsass.exe, but not a peep from SpyShelter. Apparently Sophos InterceptX couldn't block it either, so not sure what to think. You can find the tool in the link:

    https://community.sophos.com/produc...erceptx-2-0-against-barkly-malware-simulation
     
  7. itman

    itman Registered Member

    Joined:
    Jun 22, 2010
    Posts:
    8,593
    Location:
    U.S.A.
    Based on this:
    https://www.barkly.com/how-stackhackr-works

    Appears StackHacker will just create a PPL process to simulate Lsass.exe protection. It was shown some time ago that Win 10 PPL can be bypassed. So all StackHacker is doing is executing the bypass against its test PPL process. However, lsass credentials can accesses a number of ways w/o direct memory access to lsass.exe:

    Credential dumping methods: https://attack.mitre.org/wiki/Technique/T1003https://attack.mitre.org/wiki/Technique/T1003

    Credential access methods: https://attack.mitre.org/wiki/Credential_Access

    In regards to specifically lsass.exe credential access:
     
  8. WildByDesign

    WildByDesign Registered Member

    Joined:
    Sep 24, 2013
    Posts:
    2,587
    Location:
    Toronto, Canada
    This one is quite interesting.

    Link: https://github.com/zeroSteiner/reflective-unloader

    This is a special DLL which you combine specifically with the original ReflectiveDLLInjection (https://github.com/stephenfewer/ReflectiveDLLInjection/tree/master/bin) by Stephen Fewer.

    Compiled binaries: https://github.com/zeroSteiner/reflective-unloader/releases
     
  9. Sampei Nihira

    Sampei Nihira Registered Member

    Joined:
    Apr 7, 2013
    Posts:
    3,365
    Location:
    Italy

    https://www.wilderssecurity.com/threads/windows-defender-is-becoming-the-powerful-antivirus-that-windows-10-needs.383448/page-71#post-2755310
     
    Last edited: May 7, 2018
  10. itman

    itman Registered Member

    Joined:
    Jun 22, 2010
    Posts:
    8,593
    Location:
    U.S.A.
    Yes. Win 10 Credential Guard will mitigate most but not all credential stealing methods.

    However, it is only applicable if your system meets the following requirements:
    https://docs.microsoft.com/en-us/wi...redential-guard/credential-guard-requirements
     
  11. shmu26

    shmu26 Registered Member

    Joined:
    Jul 9, 2015
    Posts:
    1,549
    So Windows 10 Education supports Credential Guard, but Windows 10 Pro does not.
     
  12. Sampei Nihira

    Sampei Nihira Registered Member

    Joined:
    Apr 7, 2013
    Posts:
    3,365
    Location:
    Italy
    In other cases, better then enable the ASR rule below:

    Add-MpPreference -AttackSurfaceReductionRules_Ids 9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2 -AttackSurfaceReductionRules_Actions Enabled

    "Block credential stealing from the Windows local security authority subsystem (lsass.exe)"
     
    Last edited: May 8, 2018
  13. shmu26

    shmu26 Registered Member

    Joined:
    Jul 9, 2015
    Posts:
    1,549
    Nice. So this tweaks the registry? Do you maybe know where to find the registry entry that it makes? Or is it a Group Policy setting?
     
  14. itman

    itman Registered Member

    Joined:
    Jun 22, 2010
    Posts:
    8,593
    Location:
    U.S.A.
    Only applicable to Enterprise E5, Windows Defender, and Win 10 1803:
    https://docs.microsoft.com/en-us/wi...-guard/attack-surface-reduction-exploit-guard
     
  15. Sampei Nihira

    Sampei Nihira Registered Member

    Joined:
    Apr 7, 2013
    Posts:
    3,365
    Location:
    Italy
  16. Sampei Nihira

    Sampei Nihira Registered Member

    Joined:
    Apr 7, 2013
    Posts:
    3,365
    Location:
    Italy
  17. shmu26

    shmu26 Registered Member

    Joined:
    Jul 9, 2015
    Posts:
    1,549
  18. itman

    itman Registered Member

    Joined:
    Jun 22, 2010
    Posts:
    8,593
    Location:
    U.S.A.
    Most likely because of this:
    Test the lsass.exe protection and report back.
     
  19. Sampei Nihira

    Sampei Nihira Registered Member

    Joined:
    Apr 7, 2013
    Posts:
    3,365
    Location:
    Italy
    OK.:thumb:
    If an ASR rule works, all the others ASR rules should work.
     
  20. itman

    itman Registered Member

    Joined:
    Jun 22, 2010
    Posts:
    8,593
    Location:
    U.S.A.
  21. itman

    itman Registered Member

    Joined:
    Jun 22, 2010
    Posts:
    8,593
    Location:
    U.S.A.
    :rolleyes:
     
  22. Sampei Nihira

    Sampei Nihira Registered Member

    Joined:
    Apr 7, 2013
    Posts:
    3,365
    Location:
    Italy
    We could try to insert this rule:

    Rule: Block executable files from running unless they meet a prevalence, age, or trusted list criteria
    This rule blocks the following file types from being run or launched unless they meet prevalence or age criteria set by admins, or they are in a trusted list or exclusion list:

    • Executable files (such as .exe, .dll, or .scr)
    Script files (such as a PowerShell .ps, VisualBasic .vbs, or JavaScript .js file)


    if it works this too, they all ASR rules work.
    But in Italy it's time to have dinner ........:)
     
  23. shmu26

    shmu26 Registered Member

    Joined:
    Jul 9, 2015
    Posts:
    1,549
    You can't enable a feature by powershell applet, if the feature is not installed.
    Each edition of Windows has a different set of features.
     
  24. itman

    itman Registered Member

    Joined:
    Jun 22, 2010
    Posts:
    8,593
    Location:
    U.S.A.
    Good catch!

    Here's what I get when I try to enable the lssas ASR on Win 10 1803 x(64) Home:

    Win10_1803_ASR_Rule.png
     
  25. Sampei Nihira

    Sampei Nihira Registered Member

    Joined:
    Apr 7, 2013
    Posts:
    3,365
    Location:
    Italy
    https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-exploit-guard/attack-surface-reduction-exploit-guard

    9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2

    Immagine.jpg

    :);)
     
  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.