I'm working on a college project(ethical in virtual environment) involving the mirai botnet. Very simply, mirai tries to connect to bots but also hits cowrie (honeypot) in the process. The mirai code uses a telnet connection that involves specifying a state . Read_iacs(works for connecting with bots) and user_prompt works with connecting with cowrie. I need to be able to connect to both at the same time. I don't think adjusting mirai code makes sense as a result, Instead i want to adjust the cowrie code to accept read_iacs state instead of user_prompt but not sure how to do this. Any ideas? would appreciate any help.
I tried looking at the cowrie code but the only reference to the telnet state I can see is changing between a string indicating the current parse state. It can take on the values "data", "escaped", "command", "newline", "subnegotiation", and "subnegotiation-escaped". However, these dont obviously match the telnet connection types in the mirai code(user_prompt and read_iacs). Im using twisted.conch for the cowrie implementation btw. Here is the implementation :
Here are some of the links that I have been working with also:
.py.
.py.
.conch.telnet.html
.conch.telnet.Telnet.html#state