Summery
hMailServer is a free Windows-based mail server. It lets an organization host its own email infrastructure instead of using services like Gmail or Microsoft 365.
Files
Most settings in an hMailServer installation is stored in the database. However, some settings are stored in the hMailServer.ini file. Examples of settings stored in the ini-file are paths and database connection information.
The most important and most often seen files are:
C:\Program Files (x86)\hMailServer\Bin\hMailServer.ini - It usually contains database connection details, installation paths, data directory location and admin password hash and config values
C:\Program Files (x86)\hMailServer\Database\hMailServer.sdf - It usually contains data about domains, users and database settings
Sometimes they are installed in the x64 version of program files.
You mind find encoded credentials in hMailServer.ini. They are usually encoded in simple md5, however it’s not a given.
There is also a 2john script for hmailserver.
There are also sometimes also emails stored locally in C:\Program Files (x86)\hMailServer\Data\ in the following format:
Data\
└── domain.com\
└── user\
└── Inbox\
└── *.eml
Exploitation
hMailServer uses a custom blowfish implementation to encrypt the passwords in C:\Program Files (x86)\hMailServer\Bin\hMailServer.ini. You can decrypt them with hm_decrypt or by locally running the hMailServer database password decryptor. Then, you can read it’s database
References
This github page holds a lot of data about the topic
I used this information in: Mailing, JobTwo