<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="https://build2be.com"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>build2be/com/e - forensics</title>
 <link>https://build2be.com/category/forensics</link>
 <description></description>
 <language>en</language>
<item>
 <title>Drupal site forensics</title>
 <link>https://build2be.com/content/drupal-site-forensics</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;What tools do we have for a forensic research of a Drupal site. This question popped into my head after seeing a request on the consulting mailing list.&lt;/p&gt;
&lt;p&gt;My naive approach is&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;wget -r -l 1 example.com&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This way we get a one link level deep site of which we can grep the modules used on these pages. Then &lt;code&gt;grep -r -h &quot;modules&quot; | sort -u&lt;/code&gt; gives a nice idea of the modules used.&lt;/p&gt;
&lt;p&gt;But this beauty gives us the full file names.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;grep -h -r -o &quot;[[:alnum:]\/]*modules[[:alnum:]\.\/]*&quot; * | sort -u | xargs -I {} echo {}&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Getting all the named stylesheets&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;$&amp;gt; grep \$Id *
book.css:/* $Id: book.css,v 1.2.2.1 2007/01/29 18:54:29 dries Exp $ */
comment.css:/* $Id: comment.css,v 1.1.2.2 2007/07/24 18:38:58 drumm Exp $ */
content.css:/* $Id: content.css,v 1.2.2.8 2007/08/09 19:08:16 yched Exp $ */
defaults.css:/* $Id: defaults.css,v 1.2 2006/08/25 09:01:12 drumm Exp $ */
devel.js:// $Id: devel.js,v 1.1.2.2 2007/10/21 01:06:35 weitzman Exp $
forum.css:/* $Id: forum.css,v 1.2 2006/11/14 06:30:10 drumm Exp $ */
node.css:/* $Id: node.css,v 1.2.2.1 2007/07/24 18:38:58 drumm Exp $ */
panels.css:/* $Id: panels.css,v 1.1.2.5 2008/01/10 17:51:56 merlinofchaos Exp $ */
poll.css:/* $Id: poll.css,v 1.2 2006/10/02 16:16:06 dries Exp $ */
robots.txt:# $Id: robots.txt,v 1.7.2.2 2008/02/25 02:18:25 drumm Exp $
system.css:/* $Id: system.css,v 1.21 2006/12/21 16:13:06 dries Exp $ */
tagadelic.css:/*$Id: tagadelic.css,v 1.2 2006/11/16 16:57:56 ber Exp $*/
twocol.css:/* $Id: twocol.css,v 1.4.6.4 2007/12/11 21:02:35 merlinofchaos Exp $ */
user.css:/* $Id: user.css,v 1.4 2006/12/30 07:45:31 dries Exp $ */
video.css:/* $Id: video.css,v 1.1.4.1 2008/02/20 13:16:35 fax8 Exp $&amp;nbsp;&amp;nbsp; /*&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So is this site safe? And what version is it using?&lt;/p&gt;
&lt;p&gt;The we need to get the CVS TAGS from ie &lt;a href=&quot;http://cvs.drupal.org/viewvc.py/drupal/drupal/robots.txt?revision=1.7.2.2&amp;amp;view=markup&amp;amp;pathrev=DRUPAL-5&quot;&gt;http://cvs.drupal.org/viewvc.py/drupal/drupal/robots.txt?revision=1.7.2....&lt;/a&gt; to see this is a member of DRUPAL-5.8, 5.9 or 5.10&lt;/p&gt;
&lt;p&gt;With this we get the HTML which contains the CVS Tags&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;wget --header=&quot;Accept: text/html&quot; &quot;&lt;a href=&quot;http://cvs.drupal.org/viewvc.py/drupal/drupal/robots.txt?revision=1.7.2.2&amp;amp;view=markup&amp;amp;pathrev=DRUPAL-5&amp;quot;&amp;lt;br /&amp;gt;&lt;/code&gt;&lt;/pre&gt;&quot;&gt;http://cvs.drupal.org/viewvc.py/drupal/drupal/robots.txt?revision=1.7.2....&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To get the revision out of the downloaded file we need something like this&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;grep -h &quot;\$Id.*,v&quot; * | grep -o &quot;[0-9][0-9]*\.[0-9\.]*&quot;&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-4 field-type-taxonomy-term-reference field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;free form:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/drupal&quot;&gt;drupal&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/category/forensics&quot;&gt;forensics&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Wed, 24 Sep 2008 08:41:15 +0000</pubDate>
 <dc:creator>clemens</dc:creator>
 <guid isPermaLink="false">61 at https://build2be.com</guid>
 <comments>https://build2be.com/content/drupal-site-forensics#comments</comments>
</item>
</channel>
</rss>
