DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Disable SQL Console

 5 Replies
 2 Subscribed to this topic
 40 Subscribed to this forum
Sort:
Author
Messages
Growing Member
Posts: 54
Growing Member

I've been asked to disable the SQL Console on a DNN installation for security reasons. Is there any option for this? Anyone tried?

 

Vicenç Masanas
Disgrafic ITec SL Banyoles - Spain
Advanced Member
Posts: 207
Advanced Member
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
MVP
MVP
You're an MVP!
New Poster
New Poster
Congrats on posting!
Never tried it, but my first idea would be to remove the entry from the database, in the PersonaBarMenu table. But maybe someone has a better idea.
Senior Member
Posts: 1607
Senior Member
MVP
MVP
You're an MVP!
New Poster
New Poster
Congrats on posting!

In the past, you used to be able to just uninstall this specific persona bar extension.  Since they've been combined, this is no longer possible.  

If you're using CloudFlare, the managed rules will block this for you automatically (as well as accessing the web-config in the same way).  

Otherwise, you will need to do it with a rule that you create, either in DNN or your chosen WAF (if possible).  

I'd suggest adding a rewriteRule in your web.config to block access to the following path, and duplicating this rule in your WAF.  

<code>/DesktopModules/admin/Dnn.PersonaBar/Modules/Dnn.SqlConsole/</code>
 

Growing Member
Posts: 54
Growing Member
This solved the issue and can be easily reverted if required:
update PersonaBarMenu set Enabled=0 where modulename = 'SqlConsole'
Vicenç Masanas
Disgrafic ITec SL Banyoles - Spain
Growing Member
Posts: 54
Growing Member
And as Will suggested adding this rule also helps closing any possible access there:












Vicenç Masanas
Disgrafic ITec SL Banyoles - Spain
Growing Member
Posts: 54
Growing Member
<rewrite>
    <rules>
        <rule name="Block SQL Console Access" stopprocessing="true">
            <match url=".*">
                <conditions>
                    <add ignorecase="true" input="{REQUEST_URI}" pattern="personaBar/SqlConsole">
                    <!--add>
                <!--conditions>
                <action statuscode="403" statusdescription="Access Denied" statusreason="Forbidden"
                    type="CustomResponse">
                <!--action>
            <!--match>
        <!--rule>
    <!--rules>
<!--rewrite>

 

Image:
 

Vicenç Masanas
Disgrafic ITec SL Banyoles - Spain

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved