Skip to content

Commit

Permalink
Merge pull request BC-SECURITY#703 from BC-SECURITY/release/5.7.2-pri…
Browse files Browse the repository at this point in the history
…vate
  • Loading branch information
vinnybod authored Sep 29, 2023
2 parents 02a0496 + 69e3bed commit e727917
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 26 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [5.7.2] - 2023-09-28

- Updated Dropbox C2 to use new API endpoints (@Cx01N)
- Standardized Kill Date and Working Hours for PowerShell Agents (@Cx01N)
- Apply fixes for future Python 3.12 compatibility (@Vinnybod)
Expand Down Expand Up @@ -593,7 +596,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated shellcoderdi to newest version (@Cx01N)
- Added a Nim launcher (@Hubbl3)

[Unreleased]: https://github.com/BC-SECURITY/Empire-Sponsors/compare/v5.7.1...HEAD
[Unreleased]: https://github.com/BC-SECURITY/Empire-Sponsors/compare/v5.7.2...HEAD

[5.7.2]: https://github.com/BC-SECURITY/Empire-Sponsors/compare/v5.7.1...v5.7.2

[5.7.1]: https://github.com/BC-SECURITY/Empire-Sponsors/compare/v5.7.0...v5.7.1

Expand Down
2 changes: 1 addition & 1 deletion empire/server/api/v2/download/download_dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pydantic import BaseModel

from empire.server.api.v2.tag.tag_dto import Tag, domain_to_dto_tag
from empire.server.utils.data_util import removeprefix
from empire.server.utils.string_util import removeprefix


def domain_to_dto_download(download):
Expand Down
2 changes: 1 addition & 1 deletion empire/server/common/empire.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

from . import agents, credentials, listeners, stagers

VERSION = "5.7.1 BC Security Fork"
VERSION = "5.7.2 BC Security Fork"

log = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Dict

from empire.server.core.module_models import EmpireModule
from empire.server.utils.data_util import removeprefix, removesuffix
from empire.server.utils.string_util import removeprefix, removesuffix


class Module:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Dict, Optional, Tuple

from empire.server.core.module_models import EmpireModule
from empire.server.utils.data_util import removeprefix, removesuffix
from empire.server.utils.string_util import removeprefix, removesuffix


class Module:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Dict, Optional, Tuple

from empire.server.core.module_models import EmpireModule
from empire.server.utils.data_util import removeprefix, removesuffix
from empire.server.utils.string_util import removeprefix, removesuffix


class Module:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Dict, Optional, Tuple

from empire.server.core.module_models import EmpireModule
from empire.server.utils.data_util import removeprefix, removesuffix
from empire.server.utils.string_util import removeprefix, removesuffix


class Module:
Expand Down
2 changes: 1 addition & 1 deletion empire/server/stagers/osx/application.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

from empire.server.utils.data_util import removeprefix, removesuffix
from empire.server.utils.string_util import removeprefix, removesuffix

log = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion empire/server/stagers/osx/dylib.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from empire.server.common import helpers
from empire.server.utils.data_util import removeprefix, removesuffix
from empire.server.utils.string_util import removeprefix, removesuffix


class Stager:
Expand Down
2 changes: 1 addition & 1 deletion empire/server/stagers/osx/pkg.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from empire.server.common import helpers
from empire.server.utils.data_util import removeprefix, removesuffix
from empire.server.utils.string_util import removeprefix, removesuffix


class Stager:
Expand Down
Empty file added empire/server/utils/__init__.py
Empty file.
14 changes: 0 additions & 14 deletions empire/server/utils/data_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,3 @@ def ps_convert_to_oneliner(psscript):
def is_port_in_use(port: int) -> bool:
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
return s.connect_ex(("localhost", port)) == 0


def removeprefix(s, prefix):
# Remove when we drop Python 3.8 support
if s.startswith(prefix):
return s[len(prefix) :]
return s


def removesuffix(s, suffix):
# Remove when we drop Python 3.8 support
if s.endswith(suffix):
return s[: -len(suffix)]
return s
12 changes: 12 additions & 0 deletions empire/server/utils/string_util.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
def removeprefix(s, prefix):
# Remove when we drop Python 3.8 support
if s.startswith(prefix):
return s[len(prefix) :]
return s


def removesuffix(s, suffix):
# Remove when we drop Python 3.8 support
if s.endswith(suffix):
return s[: -len(suffix)]
return s
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from empire.server.utils.data_util import removeprefix, removesuffix
from empire.server.utils.string_util import removeprefix, removesuffix


def test_remove_prefix():
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "empire-bc-security-fork"
version = "5.7.1"
version = "5.7.2"
description = ""
authors = ["BC Security <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit e727917

Please sign in to comment.