Changeset 1617
- Timestamp:
- 06/10/08 20:04:19 (3 months ago)
- Files:
-
- hive/trunk/data_webapp/app/controllers/hc_database_controller.rb (modified) (4 diffs)
- hive/trunk/data_webapp/app/models/post_office.rb (modified) (2 diffs)
- hive/trunk/data_webapp/app/views/post_office/job_completed.text.plain.erb (modified) (1 diff)
- hive/trunk/data_webapp/app/views/post_office/job_submitted.text.plain.erb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
hive/trunk/data_webapp/app/controllers/hc_database_controller.rb
r1616 r1617 57 57 end 58 58 59 # Refresh the DroneJob object with what has been stored in the database, 60 # since we did not perform an explicit save. 61 # XXX: This functionality should improve in Rails v2.1 62 if not job.id.nil? 63 job = DroneJob.find(job.id) 64 end 65 66 # If requested, send notification that the DroneJob has been processed. 59 67 if job.notify_source and job.job_source.response_protocol == 'smtp' 60 68 PostOffice.deliver_job_submitted(job) 61 69 end 70 62 71 return job.id.nil? ? 0 : job.id 63 72 end … … 152 161 bee_work["urls"] << url_obj 153 162 154 # Insert the HistoryUrl and retrieve the corresponding inserted object 163 # Insert the HistoryUrl and retrieve the corresponding inserted object. 155 164 if hu = insert(HistoryUrl,url_obj) 156 165 count += 1 … … 158 167 end 159 168 160 # Get the jobs associated with the QueueUrl 169 # Get the jobs associated with the QueueUrl. 161 170 jobs = [] 162 171 if not q.nil? … … 164 173 end 165 174 166 # Add the HistoryUrl to all corresponding DroneJob objects 175 # Add the HistoryUrl to all corresponding DroneJob objects. 167 176 if not hu.nil? 168 177 jobs.each do |job| 169 178 CompletedUrl.new(:history_url => hu,:drone_job => job).save! 170 if job.pending_urls_count == 0 and job.notify_source 171 if job.job_source.response_protocol == 'smtp' 172 PostOffice.deliver_job_completed(job) 173 end 179 end 180 end 181 182 # Remove the QueueUrl object and corresponding PendingUrl associations. 183 q.destroy if not q.nil? 184 185 # If requested and completed, send notification that the DroneJobs have been processed. 186 jobs.each do |job| 187 # Refresh the DroneJob object with what has been stored in the database, 188 # since we did not perform an explicit save. 189 # XXX: This functionality should improve in Rails v2.1 190 if not job.id.nil? 191 job = DroneJob.find(job.id) 192 end 193 if job.pending_urls_count == 0 and job.notify_source 194 if job.job_source.response_protocol == 'smtp' 195 PostOffice.deliver_job_completed(job) 174 196 end 175 197 end 176 198 end 177 178 # Remove the QueueUrl object179 q.destroy if not q.nil?180 199 end 181 200 end hive/trunk/data_webapp/app/models/post_office.rb
r1616 r1617 8 8 @sent_on = Time.now 9 9 @content_type = "text/plain" 10 body[: to_visit] = job.pending_urls_count10 body[:num_urls] = job.pending_urls_count 11 11 body[:job_id] = job.id.nil? ? 0 : job.id 12 @subject = "[Honeyclient Job ##{body[:job_id]}: Submitted]" 12 if (body[:job_id] > 0) and (body[:num_urls] > 0) 13 body[:status] = 'Submitted' 14 else 15 body[:status] = 'Error' 16 @bcc = "darien@kindlund.com" 17 end 18 @subject = "[Honeyclient Job ##{body[:job_id]}: #{body[:status]}]" 13 19 end 14 20 … … 19 25 @from = "honeyclient@navi.kindlund.net" 20 26 headers "Reply-to" => "honeyclient@mitre.org" 21 job_id = job.id.nil? ? 0 : job.id 22 @subject = "[Honeyclient Job ##{job_id}: Completed]" 27 body[:job_id] = job.id.nil? ? 0 : job.id 28 body[:status] = 'Completed' 29 @subject = "[Honeyclient Job ##{body[:job_id]}: #{body[:status]}]" 23 30 @sent_on = Time.now 24 31 @content_type = "text/plain" hive/trunk/data_webapp/app/views/post_office/job_completed.text.plain.erb
r1616 r1617 1 ************************************************************************************* 1 +------------+ 2 | DISCLAIMER | 3 +------------+ 2 4 3 DISCLAIMER 5 While the MITRE Honeyclient System has been extensively tested, and consistently detects new malware not detected by anti-virus scanners, there are some caveats inherent to this implementation. Please keep in mind the following: 4 6 5 ************************************************************************************* 7 - The Honeyclient does not detect attacks that execute, following a lengthy time delay (e.g., timebombs). 8 - When visiting a webpage that dynamically rotates advertisement content, the Honeyclient may not come across the same advertisement each time. As such, if an advertisement contains malicious code, that advertisement may not appear on the webpage consistently. 9 - The Honeyclients run inside a virtualized environment. Some malware will only execute on physical machines, and not virtual machines. 6 10 7 While MITRE's honeyclients have been extensively tested, and consistently detects new malware not detected by anti-virus scanners, there are some caveats inherent to honeyclient implementation. Please keep in mind the following: 11 If you have any questions, please contact honeyclient@mitre.org. 8 12 9 - The honeyclient does not detect attacks that execute following a lengthy time delay. 13 +-------------------------------+ 14 | MITRE Honeyclient System v1.2 | 15 +-------------------------------+ 16 Status: <%= @status.to_s %> 17 Job ID: #<%= @job_id.to_s %> 10 18 11 - When visiting a webpage that dynamically rotates advertisements, a honeyclient may not come across the same ads each time. In other words, if an ad is embedded with malicious code, that ad may not appear on the webpage consistently. 19 Report Summary 20 ============== 21 Suspicious Activity: <%= @compromise_found ? "FOUND" : "Not Found" %> 22 URLs Visited: <%= @visited.to_s %> 23 URLs Compromised: <%= @compromised.to_s %> 12 24 13 - Our honeyclients run on virtual machine platforms. Some malware will only execute on physical machines, and not virtual machines. 14 15 If you have any questions, we can be reached at honeyclient@mitre.org 16 17 ************************************************************************************** 18 19 Summary of Results for Submitted URLs: 20 21 <%= @compromise_found ? "SUSPICIOUS ACTIVITY FOUND" : "NO SUSPICIOUS ACTIVITY FOUND" %> 22 23 Links Visited: <%= @visited %> 24 Links Compromised: <%= @compromised %> 25 26 ************************************************************************************** 27 28 25 --------------------------------- 29 26 For more information about what this means, see the following: 30 31 27 http://www.honeyclient.org/trac/wiki/SummaryResults hive/trunk/data_webapp/app/views/post_office/job_submitted.text.plain.erb
r1616 r1617 1 Thanks! Your request has been submitted to the MITRE Honeyclient System for analysis. If you have submitted any lengthy URLs, please review the output below to make sure each URL has been parsed correctly. When all URLs have been analyzed, you will receive another message with the results. Do not reply to this message. If you have any questions, please contact honeyclient@mitre.org. 1 <%= (@status.to_s != 'Error') ? 'Thanks! Your request has been submitted to the MITRE Honeyclient System for analysis. If you have submitted any lengthy URLs, please review the output below to make sure each URL has been parsed correctly. When all URLs have been analyzed, you will receive another message with the results. Do not reply to this message. If you have any questions, please contact honeyclient@mitre.org.' : 'Unfortunately, we were unable to parse your request to the MITRE Honeyclient System. Please review the output below to make sure at least one URL was parsed correctly. If at least one URL was parsed correctly, then the system may be undergoing routine maintenance at this time -- please try your request again later. Do not reply to this message. If you have any questions, please contact honeyclient@mitre.org.' %> 2 2 3 3 +-------------------------------+ 4 4 | MITRE Honeyclient System v1.2 | 5 5 +-------------------------------+ 6 Status: <%= (@to_visit > 0) ? 'Submitted' : 'Error'%>7 Job ID: #<%= @job_id.to_s %>8 Number of URLs Parsed: <%= @ to_visit.to_s %>6 Status: <%= @status.to_s %> 7 Job ID: #<%= @job_id.to_s %> 8 Number of URLs Parsed: <%= @num_urls.to_s %>
