socket.gethostbyname() may return different results on different systems
when provided with an IP address that contains a space. This depends on
python version or other environmental factors. For example:
System 1:
>>> socket.gethostbyname('172.60 .9.109')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
>>> socket.gethostbyname('172.17 .9.109')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
System 2:
>>> socket.gethostbyname('172.60 .9.109')
'172.0.0.60'
To remedy this, this commit adds a check to verify that the IP/domain
does not contain a space, as a space is an illegal character in either.
Some users were confused when the Island started up and thought it had
frozen. I hope to alleviate this confusion by changing the order of the
log messages. If the last message displayed after initialization
gives the user instructions on accessing the island, hopefully users
will no longer be confused.
PR #1684
Based on docs it wasn't clear what user should substitute for "VERSION". By providing specific version like "v1.13.0" we clarify the format of the version string.
The Log4Shell exploiter requires the victim to contact a number of
different servers. Wait a reasonable amount of time for the victim to
call home and download the agent before issuing the shutdown command to
the server.
A race condition existed between the time when the LDAP server was
instructed to start and the first exploit was sent to the victim.
Sometimes, the first exploit would be sent before the LDAP server
finished starting, resulting in failed exploitation.
To remedy this, the LDAPExploitServer.run() function now blocks until
the server has successfully started. Once the server has started,
LDAPExploitServer.run() returns. This allows the caller to have
confidence that the LDAP server is running after LDAPExploitServer.run()
returns and alleviates the need to sleep in order to avoid the race
condition.