sliver-py icon indicating copy to clipboard operation
sliver-py copied to clipboard

Armory and extensions

Open daddycocoaman opened this issue 3 years ago • 3 comments

Before handling #21, it makes sense to implement an Armory client so users can get the extensions or aliases they want to register or call. The armory isn't exposed via gRPC so a separate async client is needed to get the data.

daddycocoaman avatar Nov 01 '22 16:11 daddycocoaman

Isn't there any way to execute commands on the beacon without passing by the wrapper functions? For example:

beacons = await client.beacons() interact = await client.interact_beacon(beacons[0].ID) task = interact.console_execute([COMMAND TO EXECUTE ON CONSOLE] //not existing fuction

This library has unfortunately a lot of limitations. @moloch-- , can we implement this future so it will be more easier than writing wrappers around extensions that can change overtime? It can also be easier for maintaining the code up to date to the newest version of sliver so you don't have to implement command wrappers.

666Danger-sudo avatar Sep 20 '23 21:09 666Danger-sudo

@666Danger-sudo Since communications with Sliver is over gRPC via protobuf, everything is eventually going to be some wrapper function.

Fortunately, the code generation for the gRPC functions has gotten a little easier to deal with. But the reality is that whenever Sliver gets changes to the .proto files, the underlying code here needs to be regenerated and the wrapper functions will need to pass the written tests. But with your example, interact.execute() does exist.

If you mean this in terms of the Armory, the reason for a separate client is because Sliver does not use gRPC to handle Armory commands. So, in order for SliverPy to know what extensions exist, and for users to be able to download extensions, it has to be written separately.

daddycocoaman avatar Sep 20 '23 21:09 daddycocoaman

I was trying .execute(), can you tell me whats the issue here? for beacon in beacons: beacon = sliver.InteractiveBeacon(beacon, CLIENT._channel) task = await beacon.execute("ls","") while True: if task.done(): print(await task.result()) break My computer goes in an infinite loop and never stops even the beacon checks in. Another thing is that this will probably be ok for execute os commands on the beacon directly, but will it work if I try to execute extensions?

666Danger-sudo avatar Sep 20 '23 22:09 666Danger-sudo