Skip to content

Commit

Permalink
Merge pull request #140 from BC-SECURITY/dev
Browse files Browse the repository at this point in the history
v3.1.3 Release
  • Loading branch information
Cx01N authored Mar 23, 2020
2 parents e1e5c82 + 97a243c commit af30a1f
Show file tree
Hide file tree
Showing 8 changed files with 240 additions and 179 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

Keep up-to-date on our blog at [https://www.bc-security.org/blog][7]

Check out the Empire GUI: [Starkiller](https://github.com/BC-SECURITY/Starkiller)
# Empire
Empire 3.1 is a post-exploitation framework that includes a pure-PowerShell 2.0 Windows agent, and compatibility with Python 3.x Linux/OS X agents. It is the merger of the previous PowerShell Empire and Python EmPyre projects. The framework offers cryptologically-secure communications and flexible architecture.

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.2
3.1.3
7 changes: 7 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
3/22/2020
------------
- Version 3.1.3 Master Release
- Fixed errors with OneDrive listener - #40 (@Cx01N)
- Fixed REST API get config error - #131 (@chenxiangfang)
- Increased timer for stale agent checkins - #130 (@C01N)

3/13/2020
------------
- Version 3.1.2 Master Release
Expand Down
9 changes: 5 additions & 4 deletions empire
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,12 @@ def start_restful_api(empireMenu, suppress=False, username=None, password=None,
"""
Returns JSON of the current Empire config.
"""
configRaw = execute_db_query(conn, 'SELECT staging_key, install_path, ip_whitelist, ip_blacklist, autorun_command, autorun_data, rootuser, api_username, api_password, api_current_token FROM config')

[staging_key, install_path, ip_whitelist, ip_blacklist, autorun_command, autorun_data, rootuser, api_username, api_password, api_current_token] = configRaw[0]
config = [{"api_password":api_password, "api_username":api_username, "autorun_command":autorun_command, "autorun_data":autorun_data, "current_api_token":api_current_token, "install_path":install_path, "ip_blacklist":ip_blacklist, "ip_whitelist":ip_whitelist, "staging_key":staging_key, "version":empire.VERSION}]
api_username = g.user['username']
api_current_token = g.user['api_token']
configRaw = execute_db_query(conn, 'SELECT staging_key, install_path, ip_whitelist, ip_blacklist, autorun_command, autorun_data, rootuser FROM config')

[staging_key, install_path, ip_whitelist, ip_blacklist, autorun_command, autorun_data, rootuser] = configRaw[0]
config = [{"api_username":api_username, "autorun_command":autorun_command, "autorun_data":autorun_data, "current_api_token":api_current_token, "install_path":install_path, "ip_blacklist":ip_blacklist, "ip_whitelist":ip_whitelist, "staging_key":staging_key, "version":empire.VERSION}]
return jsonify({'config': config})


Expand Down
1 change: 0 additions & 1 deletion lib/common/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,6 @@ def handle_agent_staging(self, sessionID, language, meta, additional, encData, s
'message': message
})
dispatcher.send(signal, sender="agents/{}".format(sessionID))

nonce = helpers.random_string(16, charset=string.digits)
delay = listenerOptions['DefaultDelay']['Value']
jitter = listenerOptions['DefaultJitter']['Value']
Expand Down
2 changes: 1 addition & 1 deletion lib/common/empire.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from builtins import str
from builtins import range

VERSION = "3.1.2 BC-Security Fork"
VERSION = "3.1.3 BC-Security Fork"

from pydispatch import dispatcher

Expand Down
11 changes: 9 additions & 2 deletions lib/common/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,9 +758,16 @@ def lastseen(stamp, delay, jitter):
"""
try:
delta = datetime.now() - datetime.strptime(stamp, "%Y-%m-%d %H:%M:%S")
if delta.seconds > delay * (jitter + 1) * 5:

# Set min threshold for delay/jitter
if delay < 1:
delay = 1
if jitter < 1:
jitter = 1

if delta.seconds > delay * (jitter + 1) * 7:
return color(stamp, "red")
elif delta.seconds > delay * (jitter + 1):
elif delta.seconds > delay * (jitter + 1) * 3:
return color(stamp, "yellow")
else:
return color(stamp, "green")
Expand Down
386 changes: 216 additions & 170 deletions lib/listeners/onedrive.py

Large diffs are not rendered by default.

0 comments on commit af30a1f

Please sign in to comment.