Giter Club home page Giter Club logo

notes's Introduction

Mining The Shadows with ZoidbergStrike: A Scanner for Cobalt Strike - SANS Threat Hunting Summit

Cobalt Strike Notes and Resources

Attack Data

Resources

System32 Baselining

 $system32 = Get-ChildItem -Path C:\windows\System32\ -Include '*.exe' -Recurse -ErrorAction SilentlyContinue |

 % {

             [PSCustomObject] @{
                 file_name = $_.name
                 file_path = $_.FullName
                 InternalName = $_.VersionInfo.InternalName
                 fileDescription = $_.VersionInfo.FileDescription
             }
 }

 $system32 | Export-Csv -Path ~\Desktop\data.csv

To see the objects, I just ran: $system32 | format-list

example output

...
file_name       : UsoClient.exe
file_path       : C:\windows\System32\UsoClient.exe
InternalName    : UsoClient
fileDescription : UsoClient
Product         :
...

UAC Elevate

The following are all auto-elevate binaries in System32 that could potentially be used to host a UAC bypass.

Get-ExecutableManifest is in the NtObjectManager PowerShell module.

Install-Module -Name NtObjectManager

The following PowerShell code was used to obtain these files:

ls C:\Windows\System32\*.exe | Get-ExecutableManifest | ? { $_.AutoElevate -and ($_.ExecutionLevel -eq 'requireAdministrator') }

If any of these require GUI interaction, then they are unlikely to be abused in the wild.

Additional references:

Git Search

from github import Github

ACCESS_TOKEN = 'TOKEN HERE'

g = Github(ACCESS_TOKEN)

def search_github(keyword):
    rate_limit = g.get_rate_limit()
    rate = rate_limit.search
    if rate.remaining == 0:
        print(f'You have 0/{rate.limit} API calls remaining. Reset time: {rate.reset}')
        return
    else:
        print(f'You have {rate.remaining}/{rate.limit} API calls remaining')

    query = f'"{keyword}" in:file'
    result = g.search_code(query, order='desc')

    max_size = 100
    print(f'Found {result.totalCount} file(s)')
    if result.totalCount > max_size:
        result = result[:max_size]

    for file in result:
        print(f'{file.download_url}')


if __name__ == '__main__':
    keyword = input('Enter keyword[spawnto_x86, spawnto_x64, pipename, dns_idle]: ')
    search_github(keyword)

I use PowerShell to download the the files:

gc results.txt | % {iwr $_ -outf $(split-path $_ -leaf)}

Simple grep

$csprofiles=~\Desktop\profiles\*.profile
 Get-ChildItem -Path $csprofiles -Recurse | Select-String -Pattern 'set uri' -CaseSensitive | sort |  Get-Unique

notes's People

Contributors

mhaggis avatar clr2of8 avatar

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.