Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

"Get Agent Results" REST API Call Should Return "taskID" Variable #822

Closed
utkusen opened this issue Nov 15, 2017 · 3 comments · Fixed by #854
Closed

"Get Agent Results" REST API Call Should Return "taskID" Variable #822

utkusen opened this issue Nov 15, 2017 · 3 comments · Fixed by #854
Assignees

Comments

@utkusen
Copy link
Contributor

utkusen commented Nov 15, 2017

Empire Version

2.3

OS Information (Linux flavor, Python version)

Both Kali Linux, macOS

Expected behavior and description of the error, including any actions taken immediately prior to the error. The more detail the better.

Let's say you triggered whoami command with "Task an Agent to run a Shell Command" API Call for 4 times on an agent. It produces an output like that for the last one:

{ "success": true, "taskID": 4}

So "Get Agent Results" API Call will return something like that:

{
  "results": [
    {
      "AgentName": "AL8ZGMW7",
      "AgentResults": [
        "Utku", "Utku", "Utku", "Utku"
      ]
    }
  ]
}

When you trigger "Delete Agent Results" API Call, it deletes Agent Results but not taskID value. So if you trigger the "Task an Agent to run a Shell Command" again, response will be:

{ "success": true, "taskID": 5}

When you trigger the "Get Agent Results" again, response will be:

{
  "results": [
    {
      "AgentName": "AL8ZGMW7",
      "AgentResults": [
        "Utku"
      ]
    }
  ]
}

So taskID:5 is equal to AgentResult[0] When you trigger another taskID:6 will equal to AgentResult[1]. Eventually, you will lose the track of which result belongs to which taskID

My suggestion is: "Get Agent Results" should include taskID as well so we can keep track which result belongs to which taskID

@crossmxn
Copy link

Any updates?

@utkusen
Copy link
Contributor Author

utkusen commented Nov 29, 2017

no updates but I reverted the commit that removes taskid. I'm using it in that way for myself

@crossmxn
Copy link

Do you have a link to the commit? Thankss

xorrior added a commit that referenced this issue Dec 18, 2017
Added TaskID variable to "get_agent_results" API call (Resolves #822 and issue with DeathStar)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants