=begin Copyright 2010-2013 Tasos Laskos Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =end # # XSS audit module # # It doesn't just look for the injected XSS string in the HTML code # but actually parses the code and looks for the injected element proper. # # @author Tasos "Zapotek" Laskos # # @version 0.3.2 # # @see http://cwe.mitre.org/data/definitions/79.html # @see http://ha.ckers.org/xss.html # @see http://secunia.com/advisories/9716/ # class Arachni::Modules::XSS < Arachni::Module::Base def self.tag @tag ||= 'some_dangerous_input_' + seed end def self.strings @strings ||= [ # straight injection '<' + tag + '/>', # go for an error '\'-;<' + tag + '/>', # break out of HTML comments '--> <' + tag + '/>