Skip to content
This repository was archived by the owner on Sep 2, 2022. It is now read-only.
This repository was archived by the owner on Sep 2, 2022. It is now read-only.

SharpHound ends execution upon network disconnection #89

@HawkSec

Description

@HawkSec

Hello.

Sharphound does not validate before each action whether the network connection is up or not.
As soon as the connection drops, bloodhound thinks the task finished, saving and closing the resulting zip file.
When importing to the UI, the files are damaged, so it cannot proceed.

I had an assessment where I had only 30 seconds connected to the network before being moved to a quarantined vlan, so it would be wonderful if you can add a way to validate connection state before continuing and pause the execution until it is reestablished.

Something like this should work. Maybe the interface index to check could be a parameter:
$networkavailable = $false;
foreach ($adapter in Get-NetAdapter -InterfaceIndex 1){
if ($adapter.status -eq "Up"){$networkavailable = $true; break;}
}
echo $networkavailable;

Alternatively, I can do it myself, if you point me in the right direction (I don't know which file to modify for this).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions