Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Remove malicious scriptRemove malicious script
Previous
 
Next
New Post
10/29/2016 11:22 AM
 

The DNN site that I have set up for a friend has apparently been exploited. One of the modules in the home page is adding what appears to be a malicious script. I've scanned all the site files with no match so I image the exploit must be injected from the database. It is an HTML Module but when I go to edit the content of the module I do not see the script. I imagine that the module itself is injecting the script but I'm not familiar enough with DNN to know where the content might be stored. Here is the Module output (edited down for brevity). Would anyone be able to tell me where I might find this so I can remove it?

<div id="dnn_ctr424_ContentPane" class="BlackTitleContentpane">

        <!-- Start_Module_424 --><div id="dnn_ctr424_ModuleContent" class="DNNModuleContent ModDNNHTMLC">

            <div id="dnn_ctr424_HtmlModule_lblContent" class="Normal">

               [...HTML Content..]

            </div>

        </div>

        <script type="text/javascript">[Malicious Code]</script><!-- End_Module_424 -->

 

    </div>

 
New Post
10/29/2016 11:41 AM
 
Check the module settings on the page. Under module settings/advanced settings. Check the header & footer section for the code. Looks like it probably in the footer section.
 
New Post
10/29/2016 11:43 AM
 

So, right after posting this I was able to fin it myself. I figure that I will keep this here just in case someone else runs into this. The script was in the footer of the dnn_TabModules table. Since none of my modules had any footers I was able to run this SQL command to remove it though I imagine I could also have done it via the editor on the site.

update dnn_TabModules set footer = NULL where footer is not null

Here are some signatures of the malicious script.

function tnaq()
function szez(a)
fkhu=window["eval"]("eval")
ykra='fromCharCode'

 
New Post
10/29/2016 11:56 AM
 

James Rosenfelt wrote:
Check the module settings on the page. Under module settings/advanced settings. Check the header & footer section for the code. Looks like it probably in the footer section.

Thanks for the response you were right on. That would have been much easier than running the SQL script.

 
New Post
10/29/2016 6:50 PM
 
Installing and running latest version of DNN Security Analyser module should list you all modules headers and footers with SQL or JS code as well.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Remove malicious scriptRemove malicious script


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

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

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. 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.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out