<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: james chambers</title>
    <description>The latest articles on DEV Community by james chambers (@james_chambers_cf20b680cf).</description>
    <link>https://dev.to/james_chambers_cf20b680cf</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4209875%2F98bc1b85-5085-425f-9c55-fc6afdb34e00.png</url>
      <title>DEV Community: james chambers</title>
      <link>https://dev.to/james_chambers_cf20b680cf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/james_chambers_cf20b680cf"/>
    <language>en</language>
    <item>
      <title>OpenAI Beelzebub Linux Simulation with Custom Wazuh Detection Rules</title>
      <dc:creator>james chambers</dc:creator>
      <pubDate>Tue, 27 Oct 2026 04:16:32 +0000</pubDate>
      <link>https://dev.to/james_chambers_cf20b680cf/openai-beelzebub-linux-simulation-with-custom-wazuh-detection-rules-48lm</link>
      <guid>https://dev.to/james_chambers_cf20b680cf/openai-beelzebub-linux-simulation-with-custom-wazuh-detection-rules-48lm</guid>
      <description>&lt;h5&gt;
  
  
  Intro
&lt;/h5&gt;

&lt;p&gt;I set out on this lab to learn how to set up a honey pot and how to connect it to SIEM. I choose a honeypot called Beelzebub that can emulate real shell responses to attackers by querying OpenAI with an API key. The SIEM I am using is Wazuh for it's customization and flexibility. Using Wazuh will allow me to write custom rules that will send alerts for 3 different attacker simulations I want to run on Beelzebub. The attacks I am going to carry out is a TCP port scan, a brute force attack, and running Linux shell commands over ssh. I want to thank the developers of Beelzebub for making this awesome open source tool and I also want to give a massive thanks to Taylor Walton, whose article I used as an outline for my lab. &lt;/p&gt;

&lt;p&gt;Before we get into it a little about me. I have been studying cybersecurity for a little over 3 years now. I seen the blind spot that people have for security on the internet and I want to help fill the role of protecting. I am always looking to help others and cybersecurity is a really good way to protect others. &lt;/p&gt;

&lt;h5&gt;
  
  
  Setup
&lt;/h5&gt;

&lt;p&gt;Before I can jump into using Beelzebub I need to make sure I meet all the prerequisites. I met all except Docker was not installed yet. Once I had Docker installed I could start my journey with Beelzebub. I started by getting a clone of the Beelzebub-labs and then ran './install.sh --docker'. Once I had confirmed docker was up and had recorded a log I shut down docker using 'docker compose down' and I had quite a few configurations I needed to add/edit. I used Beelzebub ssh for port 2222 since I was using ssh port 22 to run the machine I was on. This also created a problem when I first tried launching all the Beelzebub instances. It tried running on ssh on port 22, among many other things, but since the Linux machine was using it, it failed to launch. I had to go into 'beelzebub.yml' and remove port 22 from the configuration so it would finally work. Once I had figured that out, I moved on to configuring the ssh 2222 Yamal file to respond as if it were an actual instance of Linux. I ran into a bump here where I could connect to Beelzebub via ssh but I would not get any responses when using commands. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fju13r2zyio3d1zkuzmqw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fju13r2zyio3d1zkuzmqw.png" alt=" " width="736" height="217"&gt;&lt;/a&gt;&lt;br&gt;
This was quite annoying, but, after combing back through everything a few times, I found a couple of mistakes I had made. First, I had not correctly copied the API key so I basically had no key at all. Second, I figured out needed to pay a small fee to get the API keys to respond from OpenAI. Now $5 poorer, Beelzebub finally responded to my Linux commands. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdf8rzr4i3cs6rcn872f0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdf8rzr4i3cs6rcn872f0.png" alt=" " width="650" height="347"&gt;&lt;/a&gt;&lt;br&gt;
Pretty awesome to see Beelzebub responding as if I had connected to a real instance of Linux. I wasn't quite done just yet though. I needed to set up a Wazuh agent on the machine to forward logs to the SIEM. Once I had installed the agent I needed to tell the agent where to get the logs from. I needed to change 'beelzebub.yaml' to save the logs to a text file. I ran into more trouble here but it was a typo. I had misspelled one of the words by one letter in the configuration file and I just couldn't find it for the longest time. When I finally realized what I had done, I felt so dumb. On the bright side though it did cause me to be much more cautions and I did not make another typo for the remainder of this lab... I'm sure I will eventually make this mistake again. With all the configurations now spelt the right way, I was finally getting logs in my SIEM from Beelzebub. On to the attacks!!!&lt;/p&gt;

&lt;h5&gt;
  
  
  Simulating Attacker Behavior
&lt;/h5&gt;

&lt;h6&gt;
  
  
  PORT SCAN
&lt;/h6&gt;

&lt;p&gt;The first attack I wanted to see Beelzebub detect was a stealth scan... Until I realized it couldn't detect it. I could not get Beelzebub to detect the stealth scan but I could get it to detect a TCP port scan. I pivoted to making a Wazuh manager rule for TCP traffic instead. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyap4ihyxvpzup9p3b7hd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyap4ihyxvpzup9p3b7hd.png" alt=" " width="533" height="187"&gt;&lt;/a&gt;&lt;br&gt;
This rule will detect a new TCP session and send an alert to the Wazuh SIEM that says "Possible TCP port scan." I know this isn't exactly the best way to detect a TCP port scan but for this lab this is enough for a proof of concept. I was a little frustrated I couldn't get a better alert for this attack but my other attempts kept ending in failure. I did however get an alert to go off when new TCP sessions were created which is a good start to me. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fni6jo72lgpjhz762zefw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fni6jo72lgpjhz762zefw.png" alt=" " width="800" height="395"&gt;&lt;/a&gt;&lt;br&gt;
(Wazuh events of TCP traffic)&lt;/p&gt;

&lt;h6&gt;
  
  
  BRUTE FORCE (METASPLOIT)
&lt;/h6&gt;

&lt;p&gt;Any excuse to use Metasploit is a welcome one for me. One of my early memories of getting into cybersecurity is using Metasploit to hack into other computers in labs. Of course I could've just manually typed in multiple different passwords at random... but where's the fun in that. First though, I configured a few new alerts for the Wazuh manager.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb4bls2lmiuwrk66v2c8x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb4bls2lmiuwrk66v2c8x.png" alt=" " width="657" height="430"&gt;&lt;/a&gt;&lt;br&gt;
Now that Wazuh will send alerts for the login attempts it was time to use Metasploit. I went to the 'ssh_login' and set up all the values I needed. I created my own password list and made sure I was trying this over port 2222. Then I ran the command and let it try all the passwords for me. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F34n5z5bvk4trdkglcsid.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F34n5z5bvk4trdkglcsid.png" alt=" " width="725" height="917"&gt;&lt;/a&gt;&lt;br&gt;
(values set for Metasploit ssh_login)&lt;br&gt;
Unfortunately for me Metasploit could not create an actual session so my time with the tool was over but it had created the traffic I needed to have logs pop up in my SIEM.&lt;br&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwv6p6pcf3hogjh6xaz0x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwv6p6pcf3hogjh6xaz0x.png" alt=" " width="800" height="68"&gt;&lt;/a&gt;&lt;br&gt;
(Metasploit output.)&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2qywj55ilbmcobh0mqts.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2qywj55ilbmcobh0mqts.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;br&gt;
(These are all logs of failed login attempts along with one successful one.)&lt;/p&gt;

&lt;h6&gt;
  
  
  RUNNING COMMANDS
&lt;/h6&gt;

&lt;p&gt;The final attack I wanted to do is to run commands over ssh. This was partly because I wanted to see how Beelzebub would respond to different commands. Just like all the others I started by making the rule for the Wazuh manager.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjpxy20y3y7i4rbty2m6k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjpxy20y3y7i4rbty2m6k.png" alt=" " width="677" height="208"&gt;&lt;/a&gt;&lt;br&gt;
I then ran a few commands to generate some logs. The commands I ran were the same as the image I posted earlier in this blog. It was really cool to see it spit out so believable responses. I then went over to the Wazuh SIEM and found all the logs of the commands I ran.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5wuoudhclbiihhk9b628.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5wuoudhclbiihhk9b628.png" alt=" " width="800" height="434"&gt;&lt;/a&gt;&lt;br&gt;
(logs of commands executed)&lt;/p&gt;

&lt;p&gt;I feel very acomplished in this lab. First of all, I actually got Beelzebub working. Then I moved on to an attackers point of view. I scanned for open ports I could connect to. Then I tried using Metasploit to brute force over ssh into the Beelzebub honeypot. Once I got a password, I used ssh over a normal shell to connect to Beelzebub and run commands on it. I also created rules that would trigger alerts to Wazuh. I was able to successfully receive alerts from each simulated attack proving my amazing new rules worked. &lt;br&gt;
I went too fast at times and made some silly mistakes like typos but this also taught me how careful I have to be with editing configuration files. I also learned that sometimes the answer is just a couple of bucks. I also learned that Beelzebub can't capture every kind of scan which helped show me the importance of having multiple defenses in place. &lt;/p&gt;

&lt;h5&gt;
  
  
  The End
&lt;/h5&gt;

&lt;p&gt;I enjoyed messing with Beelzebub and Wazuh. I had fun figuring out how to customize my own alerts using Wazuh rules. It was also cool to use AI to simulate a fake Linux shell to attackers. I wish I had been more careful when editing the configuration files. It also would've help to really take on the challenge one step at a time. There were multiple times during this lab that I thought something else was broken when really it was that typo or the API key being wrong. I wouldn't have been able to do this with out Taylor Walton. He wrote an excellent article on Medium and even made a video to go along with it. It was immense help during this lab and I often found myself referencing it when things went wrong. &lt;/p&gt;

&lt;h5&gt;
  
  
  Refrences
&lt;/h5&gt;

&lt;p&gt;Beelzebub, Open-source deception framework&lt;/p&gt;

&lt;p&gt;Beelzebub&lt;/p&gt;

&lt;p&gt;This helped me download and start beelzebub.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/beelzebub-labs/beelzebub/blob/main/README.md" rel="noopener noreferrer"&gt;https://github.com/beelzebub-labs/beelzebub/blob/main/README.md&lt;/a&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Install Docker Engine on Ubuntu&lt;/p&gt;

&lt;p&gt;Docker&lt;/p&gt;

&lt;p&gt;This helped me install the prerequisite DOCKER for Beelzebub.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository" rel="noopener noreferrer"&gt;https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wazuh rule for ssh traffic ( I used as an example and then wrote my own )&lt;/p&gt;

&lt;p&gt;Taylore Walton, SOCFortress&lt;/p&gt;

&lt;p&gt;Sep 23, 2025&lt;/p&gt;

&lt;p&gt;This was the original rule used in the Medium article that I used to test if my beelzebub was forwarding logs correctly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/socfortress/Wazuh-Rules/blob/main/Beelzebub/100660-beelzebub.xml" rel="noopener noreferrer"&gt;https://github.com/socfortress/Wazuh-Rules/blob/main/Beelzebub/100660-beelzebub.xml&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Deploying an AI Honeypot with Beelzebub + OpenAI&lt;/p&gt;

&lt;p&gt;Taylor Walton, SOCFortress&lt;/p&gt;

&lt;p&gt;Sep 28, 2025&lt;/p&gt;

&lt;p&gt;This was my main guide during the lab. From setup to configurations this was the piece that showed me in steps how to use the beelzebub tool.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://socfortress.medium.com/deploying-an-ai-honeypot-with-beelzebub-openai-smarter-traps-for-smarter-attackers-d86552d35a9e" rel="noopener noreferrer"&gt;https://socfortress.medium.com/deploying-an-ai-honeypot-with-beelzebub-openai-smarter-traps-for-smarter-attackers-d86552d35a9e&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Rules Syntax&lt;/p&gt;

&lt;p&gt;Wazuh&lt;/p&gt;

&lt;p&gt;This was the piece that helped me to create all the different rules for Wazuh.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://documentation.wazuh.com/current/user-manual/ruleset/ruleset-xml-syntax/rules.html#rules-field" rel="noopener noreferrer"&gt;https://documentation.wazuh.com/current/user-manual/ruleset/ruleset-xml-syntax/rules.html#rules-field&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TCP Connect Scan&lt;/p&gt;

&lt;p&gt;Nmap&lt;/p&gt;

&lt;p&gt;This helped me to run the correct command and how I could modify it with flags.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://nmap.org/book/scan-methods-connect-scan.html" rel="noopener noreferrer"&gt;https://nmap.org/book/scan-methods-connect-scan.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Active Scanning&lt;/p&gt;

&lt;p&gt;MITRE ATT&amp;amp;CK&lt;/p&gt;

&lt;p&gt;This was the attack technique I was simulating.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://attack.mitre.org/techniques/T1595/" rel="noopener noreferrer"&gt;https://attack.mitre.org/techniques/T1595/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Vulnerable Application&lt;/p&gt;

&lt;p&gt;Dwelch-r7, h00die, james, zeroSteiner, cnotin&lt;/p&gt;

&lt;p&gt;Feb 23 2017&lt;/p&gt;

&lt;p&gt;This helped me navigate Metasploit and helped me use the right auxiliary.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/auxiliary/scanner/ssh/ssh_login.md" rel="noopener noreferrer"&gt;https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/auxiliary/scanner/ssh/ssh_login.md&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Brute Force&lt;/p&gt;

&lt;p&gt;MITRE ATT&amp;amp;CK&lt;/p&gt;

&lt;p&gt;This was the attack technique I was simulating.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://attack.mitre.org/techniques/T1110/" rel="noopener noreferrer"&gt;https://attack.mitre.org/techniques/T1110/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Command and Scripting Interpreter: Unix Shell&lt;/p&gt;

&lt;p&gt;MITRE ATT&amp;amp;CK&lt;/p&gt;

&lt;p&gt;This was the attack technique I was simulating.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://attack.mitre.org/techniques/T1059/004/" rel="noopener noreferrer"&gt;https://attack.mitre.org/techniques/T1059/004/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>beginners</category>
      <category>wazuh</category>
      <category>beelzebub</category>
    </item>
  </channel>
</rss>
