unclesp1d3r/CipherSwarm

View on GitHub
app/views/attacks/_mask_form.html.erb

Summary

Maintainability
Test Coverage
<%# locals: (form:, attack:) -%>

<%= field_set_tag "Mask Attack", id: "mask_attack_set" do %>
  <small class="form-text text-muted">
    A mask attack is a brute-force attack that uses a mask to define the character set to use for each position in the
    password.
    Please select either a custom mask or a mask list to use for the attack.
  </small>
  <%= form.input :mask, hint: "Manually provide a specific hashcat-formatted mask (i.e. '?a?d?l?u') string to attempt." %>
  <%= form.association :mask_list, collection: @mask_lists, hint: "Select a provided hcmask-formatted mask list to attempt." %>
<% end %>
<%= field_set_tag "Incremental Mode", id: "incremental_attack_set" do %>
  <small class="form-text text-muted">
    Incremental mode causes the attack to iterate through each position in the mask.
    For example, an eight-character mask of '?a?a?a?a?a?a?a?a' will first attempt '?a', then '?a?a', then '?a?a?a' and
    so on.
  </small>
  <%= form.input :increment_mode, hint: "Enable incremental mode to iterate through each position in the mask." %>
  <%= form.input :increment_minimum, hint: "The minimum number of character positions to attempt in the mask." %>
  <%= form.input :increment_maximum, hint: "The maximum number of character positions to attempt in the mask." %>
<% end %>
<%= field_set_tag "Character Sets", id: "character_sets_attack_set" do %>
  <small class="form-text text-muted">
    Character sets define the types of characters to use for each position in the mask.
    By default, the attack will use the default character sets defined in the hashcat configuration.
    You can override these defaults by providing custom character sets below. They are referenced in the mask using '?1'
    through '?4'.
  </small>
  <%= form.input :custom_charset_1 %>
  <%= form.input :custom_charset_2 %>
  <%= form.input :custom_charset_3 %>
  <%= form.input :custom_charset_4 %>
<% end %>
<%= field_set_tag "Markov (Advanced Setting)", id: "markov_attack_set" do %>
  <small class="form-text text-muted">
    Markov chains are used to generate passwords based on the probability of characters appearing next to each other.
    This can be useful for generating passwords that are similar to those used by the target.
    The classic Markov setting uses a pre-defined set of probabilities, while the disable Markov setting will disable
    the Markov chain. Leave the defaults if you are unsure.
  </small>
  <%= form.input :classic_markov, hint: "Enable the classic Markov chain to generate passwords based on pre-defined probabilities." %>
  <%= form.input :disable_markov, hint: "Disable the Markov chain to generate passwords based on the mask." %>
  <%= form.input :markov_threshold, hint: "The threshold for the Markov chain to use when generating passwords." %>
<% end %>