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

SharpHound ends execution upon network disconnection #89

Open
HawkSec opened this issue Jan 7, 2020 · 0 comments
Open

SharpHound ends execution upon network disconnection #89

HawkSec opened this issue Jan 7, 2020 · 0 comments

Comments

@HawkSec
Copy link

HawkSec commented Jan 7, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant