Skip to content

Commit

Permalink
Merge pull request #97 from BC-SECURITY/release/2.8.2
Browse files Browse the repository at this point in the history
v2.8.2 into main
  • Loading branch information
vinnybod authored Sep 22, 2024
2 parents 782e14e + 5ae9a8c commit 797e22f
Show file tree
Hide file tree
Showing 14 changed files with 86 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-private-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Push new branch
run: git push origin ${{ env.RELEASE_BRANCH }}
- name: Create pull request into ${{ env.TARGET_BRANCH }}
uses: thomaseizinger/create-pull-request@1.3.1
uses: thomaseizinger/create-pull-request@1.4.0
with:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
head: ${{ env.RELEASE_BRANCH }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-public-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Push new branch
run: git push public ${{ env.RELEASE_BRANCH }}
- name: Create pull request into main
uses: thomaseizinger/create-pull-request@1.3.1
uses: thomaseizinger/create-pull-request@1.4.0
with:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
head: ${{ env.RELEASE_BRANCH }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-sponsor-kali-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Push new branch
run: git push origin ${{ env.RELEASE_BRANCH }}
- name: Create pull request into ${{ env.TARGET_BRANCH }}
uses: thomaseizinger/create-pull-request@1.3.1
uses: thomaseizinger/create-pull-request@1.4.0
with:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
head: ${{ env.RELEASE_BRANCH }}
Expand Down
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.8.2] - 2024-09-22

### Added

- Added request for job/task list from agents
- Added Route4Me to sponsorship section

### Fixed

- Fixed agent id not being automatically set in terminal

## [2.8.1] - 2024-05-05

### Fixed
Expand Down Expand Up @@ -373,7 +384,9 @@ Including but not limited to:

- Initial Release

[Unreleased]: https://github.com/BC-SECURITY/Starkiller-Sponsors/compare/v2.8.1...HEAD
[Unreleased]: https://github.com/BC-SECURITY/Starkiller-Sponsors/compare/v2.8.2...HEAD

[2.8.2]: https://github.com/BC-SECURITY/Starkiller-Sponsors/compare/v2.8.1...v2.8.2

[2.8.1]: https://github.com/BC-SECURITY/Starkiller-Sponsors/compare/v2.8.0...v2.8.1

Expand Down
23 changes: 7 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
[![Twitter URL](https://img.shields.io/twitter/follow/BCSecurity?style=plastic&logo=twitter)](https://twitter.com/BCSecurity)
[![Twitter URL](https://img.shields.io/twitter/follow/EmpireC2Project?style=plastic&logo=twitter)](https://twitter.com/EmpireC2Project)
[![YouTube URL](https://img.shields.io/youtube/channel/views/UCIV4xSntF1h1bvFt8SUfzZg?style=plastic&logo=youtube)](https://www.youtube.com/channel/UCIV4xSntF1h1bvFt8SUfzZg)
![Mastodon Follow](https://img.shields.io/mastodon/follow/109299433521243792?domain=https%3A%2F%2Finfosec.exchange%2F&style=plastic&logo=mastodon)
![Mastodon Follow](https://img.shields.io/mastodon/follow/109384907460361134?domain=https%3A%2F%2Finfosec.exchange%2F&style=plastic&logo=mastodon)
[![Threads](https://img.shields.io/badge/follow%20@BCSecurity0-grey?style=plastic&logo=threads&logoColor=#000000)](https://www.threads.net/@bcsecurity0)
[![Threads](https://img.shields.io/badge/follow%20@EmpireC2Project-grey?style=plastic&logo=threads&logoColor=#000000)](https://www.threads.net/@empirec2project)
[![LinkedIn](https://img.shields.io/badge/Linkedin-blue?style=plastic&logo=linkedin&logoColor=#0A66C2)](https://www.linkedin.com/company/bc-security/)

</div>
Expand All @@ -29,19 +25,14 @@ Starkiller is a Frontend for [Powershell Empire](https://github.com/BC-SECURITY/
As of Empire 5.0 and Starkiller 2.0, you no longer need to install Starkiller or build it from source.
It is prepackaged in Empire as a submodule and served via Empire's API.

[//]: # (## Sponsors)

[//]: # ()
[//]: # (<div align="center">)

[//]: # ()
[//]: # ([<img src="https://github.com/BC-SECURITY/Empire/assets/9831420/f273f4b0-400c-49ce-b62f-521239a86754" width="100"/>]&#40;https://www.cybrary.it/&#41;)

[//]: # ()
[//]: # ([<img src="https://github.com/BC-SECURITY/Empire/assets/9831420/d14af000-80d2-4f67-b70c-b62ac42b6a52" width="100"/>]&#40;https://twitter.com/joehelle&#41;)
## Sponsors
<div align="center">

[//]: # ()
[//]: # (</div>)
[<img src="https://github.com/user-attachments/assets/604fbb97-4641-4a15-a6ba-039f67694f15" width="200"/>](https://www.route4me.com//)
</div>
<!---https://github-production-user-asset-6210df.s3.amazonaws.com/20302208/354655875-3497ee72-324a-4b8a-a14b-37748115997d.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240802%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240802T160658Z&X-Amz-Expires=300&X-Amz-Signature=68f78dde4457cc5bc6642dce601e1fd439252e2796b3ebe8d8d47e17625acd9a&X-Amz-SignedHeaders=host&actor_id=20302208&key_id=0&repo_id=276544505" width="100"/>](https://twitter.com/joehelle)
</div>
--->

# Sponsorship and extra features

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "starkiller",
"version": "2.8.1",
"version": "2.8.2",
"private": true,
"scripts": {
"dev": "vite",
Expand Down
6 changes: 6 additions & 0 deletions src/api/agent-task-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ export function scriptImport(sessionId, file) {
.then((response) => response.data)
.catch((error) => Promise.reject(handleError(error)));
}
export function getJobs(sessionId) {
return axios
.post(`/agents/${sessionId}/tasks/jobs`)
.then(({ data }) => data)
.catch((error) => Promise.reject(handleError(error)));
}

export function scriptCommand(sessionId, command) {
return axios
Expand Down
6 changes: 3 additions & 3 deletions src/components/agents/AgentFileBrowser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
:open.sync="open"
:items="tree"
>
<template #label="{ item, open }">
<template #label="{ item, open: isOpen }">
<v-btn
style="margin-left: -15px; width: 100%"
class="text-left"
text
@contextmenu="show(item, $event)"
>
<div style="display: flex; justify-content: fle -start">
<div style="display: flex; justify-content: flex-start">
<v-icon v-if="!item.file">
{{ open ? "mdi-folder-open" : "mdi-folder" }}
{{ isOpen ? "mdi-folder-open" : "mdi-folder" }}
</v-icon>
<v-icon v-else>
{{ files[item.file] || "mdi-file" }}
Expand Down
5 changes: 3 additions & 2 deletions src/components/agents/AgentTasksTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
show-expand
@update:options="handleOptionsChange"
>
<template #expanded-item="{ headers, item }">
<td :colspan="headers.length">
<template #expanded-item="{ headers: scopedHeaders, item }">
<td :colspan="scopedHeaders.length">
<div>
<div
style="
Expand Down Expand Up @@ -106,6 +106,7 @@
"
>
<!-- TODO Option for original output -->
<!-- eslint-disable vue/no-v-html -->
<div
v-if="expandedTasks[item.uniqueId].htmlOutput"
v-html="expandedTasks[item.uniqueId].htmlOutput"
Expand Down
28 changes: 28 additions & 0 deletions src/components/agents/AgentTerminal.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<div class="terminal-container">
<div ref="output" class="terminal-output">
<!-- eslint-disable vue/no-v-html -->
<div
v-for="(line, index) in outputLines"
:key="index"
Expand Down Expand Up @@ -164,6 +165,12 @@ export default {
"Tasks specified agent to update delay (s) and jitter (0.0 - 1.0).",
usage: "sleep <delay> <jitter>",
},
{
command: "jobs",
description:
"Task the agent to return back a list of all previous tasks and their status",
usage: "jobs",
},
],
moduleHelpCommands: [
{
Expand Down Expand Up @@ -436,6 +443,9 @@ export default {
case "sysinfo":
this.getSysInfo();
break;
case "jobs":
this.pollJobsEndpoint();
break;
case "shell":
if (args.length < 1) {
this.isShellMenu = true;
Expand Down Expand Up @@ -594,6 +604,17 @@ export default {
this.addError(`Error executing command: ${error.message}`);
}
},
async pollJobsEndpoint() {
try {
const task = await agentTaskApi.getJobs(this.agent.session_id);
this.pollForResult(task.id);
this.addInfo("Polling jobs endpoint...");
} catch (error) {
this.addError(`Error polling jobs endpoint: ${error.message}`);
}
},
async runShellCommand(command) {
if (!this.agent || !this.agent.session_id) {
this.addError("Error: agent data is not available.");
Expand Down Expand Up @@ -838,6 +859,13 @@ export default {
return;
}
if (!this.moduleOptions.Agent || !this.moduleOptions.Agent.value) {
this.moduleOptions.Agent = {
value: this.agent.session_id,
required: true,
};
}
const missingOptions = Object.entries(this.moduleOptions)
.filter(([_, option]) => option.required && !option.value)
.map(([optionName, _]) => optionName);
Expand Down
4 changes: 2 additions & 2 deletions src/components/modules/ModulesTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
<template #item.background="{ item }">
<v-simple-checkbox v-model="item.background" disabled />
</template>
<template #expanded-item="{ headers, item }">
<td :colspan="headers.length">
<template #expanded-item="{ headers: scopedHeader, item }">
<td :colspan="scopedHeader.length">
<div class="d-flex flex-column">
<b>Description:</b>
{{ item.description }}
Expand Down
5 changes: 3 additions & 2 deletions src/components/plugins/PluginTasksTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
show-expand
@update:options="handleOptionsChange"
>
<template #expanded-item="{ headers, item }">
<td :colspan="headers.length">
<template #expanded-item="{ headers: scopedHeader, item }">
<td :colspan="scopedHeader.length">
<div>
<div
style="
Expand Down Expand Up @@ -106,6 +106,7 @@
"
>
<!-- TODO Option for original output -->
<!-- eslint-disable vue/no-v-html -->
<div
v-if="expandedTasks[item.uniqueId].htmlOutput"
v-html="expandedTasks[item.uniqueId].htmlOutput"
Expand Down
2 changes: 1 addition & 1 deletion src/utils/pause.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default async function (ms = 1000) {
export default async function pause(ms = 1000) {
// eslint-disable-next-line no-promise-executor-return
return new Promise((resolve) => setTimeout(resolve, ms));
}
15 changes: 15 additions & 0 deletions src/views/AgentEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@
text="Reload SysInfo"
@click="reloadSysInfo"
/>
<tooltip-button
icon="fa-tasks"
text="Get Agent Task Status List"
@click="getAgentTasks"
/>
<tooltip-button
v-if="initialized && !archived"
icon="fa-trash-alt"
Expand Down Expand Up @@ -387,6 +392,16 @@ export default {
);
}
},
async getAgentTasks() {
try {
await agentTaskApi.getJobs(this.agent.session_id);
this.$snack.success(`Task list queued for ${this.agent.name}`);
} catch (error) {
this.$snack.error(
`Error getting jobs for ${this.agent.name}: ${error.message}`,
);
}
},
toggleCollapsePane() {
if (this.paneSize > 95) {
this.paneSize = 50;
Expand Down

0 comments on commit 797e22f

Please sign in to comment.