You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating Kali today (August 12th, 2024), I received an exception when attempting to start Empire:
┌──(kali㉿kali)-[~]
└─$ sudo powershell-empire server
Create mysql database empire
ERROR 1007 (HY000) at line 1: Can't create database 'empire'; database exists
Expected Behavior
Empire should check for the empire databases, and if created, skip database creation and move on to starting Empire.
Steps To Reproduce
sudo powershell-empire server
See exception
Anything else?
After reviewing source code for the initial powershell-empire command, there is a referenced sql command that is required to be installed. After installing, everything works as expected:
┌──(kali㉿kali)-[~]
└─$ vi /usr/bin/powershell-empire
..
..
#!/bin/sh
set -e
# Check if running as root
if [ `id -u` -ne 0 ]; then
echo "Error: $0 must be run as root" 1>&2
exit 1
fi
systemctl start mysql
# Check if the MySQL database empire exists.
# If the DB does not exist, it will create the DB, the DB user and the
# user password.
if ! mysqlshow "empire" > /dev/null 2>&1; then <--- This guy right here
From here, I installed mysqlshow, and was able to move forward:
┌──(kali㉿kali)-[~]
└─$ mysqlshow
Command 'mysqlshow' not found, but can be installed with:
sudo apt install mariadb-client-compat
Do you want to install it? (N/y)y
sudo apt install mariadb-client-compat
Installing:
mariadb-client-compat
Summary:
Upgrading: 0, Installing: 1, Removing: 0, Not Upgrading: 0
Download size: 27.0 kB
Space needed: 103 kB / 13.3 GB available
Get:1 http://kali.download/kali kali-rolling/main amd64 mariadb-client-compat all 1:11.4.2-4 [27.0 kB]
Fetched 27.0 kB in 0s (344 kB/s)
Selecting previously unselected package mariadb-client-compat.
(Reading database ... 154113 files and directories currently installed.)
Preparing to unpack .../mariadb-client-compat_1%3a11.4.2-4_all.deb ...
Unpacking mariadb-client-compat (1:11.4.2-4) ...
Setting up mariadb-client-compat (1:11.4.2-4) ...
┌──(kali㉿kali)-[~]
└─$ sudo mysqlshow "empire"
Database: empire
+---------------------------+
| Tables |
+---------------------------+
..
..
REDACTED
┌──(kali㉿kali)-[~]
└─$ sudo powershell-empire server
[INFO]: Checking submodules...
[INFO]: No .git directory found. Skipping submodule check.
[INFO]: v2: Loading listener templates from: /usr/share/powershell-empire/empire/server/listeners/
The text was updated successfully, but these errors were encountered:
I should have mentioned, this happened today during an apt update -y && apt upgrade -y. Not a new install, this instance of Empire on Kali has been running since April. I am not sure if a new install would do this.
I tested this on a new install of Empire on Ubuntu 22.04. Anyone else coming across this should know the fix is to install the mariadb-client-compat package to resolve this problem.
I tested this on a new install of Empire on Ubuntu 22.04. Anyone else coming across this should know the fix is to install the mariadb-client-compat package to resolve this problem.
Thanks for the recommendation. Ill double check the install script is doing this correctly.
Is there an existing issue for this?
Empire Version
5.4.2
Python Version
3.11.9
Operating System
Kali
Database
MySQL
Current Behavior
After updating Kali today (August 12th, 2024), I received an exception when attempting to start Empire:
Expected Behavior
Empire should check for the empire databases, and if created, skip database creation and move on to starting Empire.
Steps To Reproduce
Anything else?
After reviewing source code for the initial
powershell-empire
command, there is a referenced sql command that is required to be installed. After installing, everything works as expected:From here, I installed
mysqlshow
, and was able to move forward:The text was updated successfully, but these errors were encountered: