<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: config_system flaw in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147724#M23577</link>
    <description>&lt;P&gt;You may need to quote the admin password hash depending on the algorithm in use, but that should be it.&lt;/P&gt;
&lt;P&gt;While I think this should produce a meaningful error, it's hardly a security issue. config_system won't even do a dry-run once the box has been configured once.&lt;/P&gt;</description>
    <pubDate>Tue, 03 May 2022 14:55:02 GMT</pubDate>
    <dc:creator>Bob_Zimmerman</dc:creator>
    <dc:date>2022-05-03T14:55:02Z</dc:date>
    <item>
      <title>config_system flaw</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147488#M23519</link>
      <description>&lt;P&gt;(i hope this board is a decent choice...)&lt;/P&gt;
&lt;P&gt;First of all: thanks to the R&amp;amp;D folks for providing us with config_system! It's a huge help for automation, and I know you know that already. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &amp;nbsp;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I seem to have found a bit of a flaw in config_system. &amp;nbsp;I did have a minor error in syntax when I generated the FTW config (yes my fault). &amp;nbsp;However, the dry-run check did not detect the syntax error properly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My config was:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;# Install Security Gateway. 
install_security_gw=" true "
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This was generated from my own Ansbile Jinja2 template, and I know I had the error there. &amp;nbsp;Notice the spaces inside the quotes. &amp;nbsp;Since dry-run didn't detect the error, my playbook continued to execute and ran the task to run config_system with the config file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After 30 minutes of no progress, everything timed out and died. &amp;nbsp;config_system never really did anything. &amp;nbsp;I re-ran it manually, and it sat at "Configuring products":&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Expert@gaia_demo:0]#  /usr/bin/config_system  -f /home/admin/gaia.ftw.config 
dos2unix: converting file /home/admin/gaia.ftw.config to Unix format ...

Validating configuration file:	Done
Configuring OS parameters:	Done
Configuring products:		-
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It was still running in the process-list:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;  863 ?        S      0:00      \_ /opt/CPsuite-R80.40/fw1/Python/bin/python3 /var/tmp/ansible-tmp-1651184043.6572037-2564807-184818913965851/AnsiballZ_command.py
  865 ?        S      0:01          \_ /bin/bash /usr/bin/config_system -f /home/admin/gaia.ftw.config
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I then looked at the config file for sanity and saw the erroneous spaces. &amp;nbsp;I fixed the config, ran it again, and it finished in just a few minutes (as expected)! &amp;nbsp;That's when I realized this was the error. I found and fixed my Jinja2 template and now it all works. &amp;nbsp;I understand this was "my fault", but it does show that there is a syntax-processing and some kind of run-time error in config_system. &amp;nbsp;Oops.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The system was a fresh-install R80.40 (no Jumbo HFA yet; that was coming next in my playbook after the reboot once the products were configured; yes I updated CPDA beforehand, too).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this is enough to have someone take a look internally. &amp;nbsp;Take care!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2022 06:13:24 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147488#M23519</guid>
      <dc:creator>Duane_Toler</dc:creator>
      <dc:date>2022-04-30T06:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: config_system flaw</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147489#M23520</link>
      <description>&lt;P&gt;Thanks for that, very interesting!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 18:57:56 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147489#M23520</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2022-04-29T18:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: config_system flaw</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147490#M23521</link>
      <description>&lt;P&gt;Does it also happen if you don't use quotes? Just curious.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 20:14:00 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147490#M23521</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2022-04-29T20:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: config_system flaw</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147491#M23522</link>
      <description>&lt;P&gt;Good point; I didn't check that. &amp;nbsp;I generally assumed that all fields should have been quoted in that config. &amp;nbsp;Next time I revert my snapshot and do a test-run of my Ansible playbook, I'll do it without quotes and just have a space after the = character. &amp;nbsp;My instinct is that it will still succeed. We'll see, tho.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course, as I write all that, I now notice not ALL of my fields had quotes. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Hah. Sigh... Consistency #Fail &amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 20:21:09 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147491#M23522</guid>
      <dc:creator>Duane_Toler</dc:creator>
      <dc:date>2022-04-29T20:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: config_system flaw</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147499#M23523</link>
      <description>&lt;P&gt;This is more of a gateway thing, so I moved it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2022 06:13:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147499#M23523</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2022-04-30T06:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: config_system flaw</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147510#M23525</link>
      <description>&lt;P&gt;My instinct was incorrect after all!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is my configuration now:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;# Install Security Gateway. 
install_security_gw= false

# Enable DAIP (dynamic ip) gateway.
# Should be "false" if CXL or Security Management enabled
gateway_daip="false"

# Enable/Disable CXL.
gateway_cluster_member="false"

# Install Security Management.
install_security_managment= true
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the space after the quote it fails, and /var/log/ftw_install.log is never written, too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I removed the spaces and now it runs, and /var/log/ftw_install.log is present.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;# Install Security Gateway. 
install_security_gw=false

# Enable DAIP (dynamic ip) gateway.
# Should be "false" if CXL or Security Management enabled
gateway_daip="false"

# Enable/Disable CXL.
gateway_cluster_member="false"

# Install Security Management.
install_security_managment=true
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looks like errant spaces after the = cause the problem. &amp;nbsp;Oops. &amp;nbsp;das Boog. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 04:19:38 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147510#M23525</guid>
      <dc:creator>Duane_Toler</dc:creator>
      <dc:date>2022-05-01T04:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: config_system flaw</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147535#M23530</link>
      <description>&lt;P&gt;I don't see any fields where a space is a valid character. Maybe toss a quick `&lt;FONT face="terminal,monaco"&gt;grep ' '&lt;/FONT&gt;` into your test suite.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.checkpoint.com/t5/General-Topics/Building-HomeLab/m-p/118820/highlight/true#M22121" target="_self"&gt;Still hoping for Vagrant images&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 22:36:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147535#M23530</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2022-05-01T22:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: config_system flaw</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147707#M23576</link>
      <description>&lt;P&gt;Right, but the issue is, and remains, that config_system doesn't do proper syntax checking. &amp;nbsp;This is how and where exploits happen. &amp;nbsp;I also re-ran it without any fields quoted, and so long as spaces aren't around the = separators, all is well. &amp;nbsp;So the issue is "spaces around the field separators".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 14:11:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147707#M23576</guid>
      <dc:creator>Duane_Toler</dc:creator>
      <dc:date>2022-05-03T14:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: config_system flaw</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147724#M23577</link>
      <description>&lt;P&gt;You may need to quote the admin password hash depending on the algorithm in use, but that should be it.&lt;/P&gt;
&lt;P&gt;While I think this should produce a meaningful error, it's hardly a security issue. config_system won't even do a dry-run once the box has been configured once.&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 14:55:02 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147724#M23577</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2022-05-03T14:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: config_system flaw</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147727#M23579</link>
      <description>&lt;P&gt;I'm not banging on the "zOMGWTFBBQ!11one" security drum. &amp;nbsp;I'm just saying "this is a runtime error" that should be fixed to fail better. &amp;nbsp;I opened this with "yes I know this is my fault", but when you have automated systems building templates for other automated systems, proper failure and feedback is important. &amp;nbsp;There's probably some fluffy "CI/CD pipeline" wording that would be relevant here somewhere.&lt;/P&gt;
&lt;P&gt;It's an error that should be fixed. &amp;nbsp;Seems silly to open a TAC case, and I didn't want to waste TAC's time for it; I was hoping some internal Check Point gurus would see this and look into it. &amp;nbsp;If TAC is the right path, tho, to get the proper workorder and CR task, then ... ok.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 15:05:00 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/config-system-flaw/m-p/147727#M23579</guid>
      <dc:creator>Duane_Toler</dc:creator>
      <dc:date>2022-05-03T15:05:00Z</dc:date>
    </item>
  </channel>
</rss>

