C# Class Simulator.SimulatedLoginAttemptGenerator

This class generates simulated login attempts to be sent to the StopGuessing algorithms by the simulator
Mostrar archivo Open project: Microsoft/StopGuessing Class Usage Examples

Public Properties

Property Type Description
ScheduledBenignAttempts SortedSet

Public Methods

Method Description
AddTypoToPassword ( string originalPassword ) : string

Add a typo to a password for simulating user typo errors

BenignLoginAttempt ( System.DateTime eventTimeUtc ) : SimulatedLoginAttempt

Get a benign login attempt to simulate

MaliciousAttemptToSantiizeIpViaAValidLogin ( IPAddress ipAddressToSanitizeThroughLogin ) : SimulatedLoginAttempt

Attacker login with correct accounts he has, trying to fool our service into thinking his IP is benign

MaliciousLoginAttemptBreadthFirst ( System.DateTime eventTimeUtc ) : SimulatedLoginAttempt

Attacker issues one guess by picking an benign account at random and picking a password by weighted distribution

MaliciousLoginAttemptBreadthFirstAvoidMakingPopular ( System.DateTime eventTimeUtc ) : SimulatedLoginAttempt

Attacker issues one guess by picking an benign account at random and picking a password by weighted distribution

MaliciousLoginAttemptWeighted ( System.DateTime eventTimeUtc ) : SimulatedLoginAttempt

Attacker issues one guess by picking an benign account at random and picking a password by weighted distribution

SimulatedLoginAttemptGenerator ( ExperimentalConfiguration experimentalConfiguration, SimulatedAccounts simAccounts, IpPool ipPool, SimulatedPasswords simPasswords ) : System

The attempt generator needs to know about the experimental configuration and have access to the sets of simulated accounts, IP addresses, and simulated passwords.

Method Details

AddTypoToPassword() public static method

Add a typo to a password for simulating user typo errors
public static AddTypoToPassword ( string originalPassword ) : string
originalPassword string The original password to add a typo to
return string

BenignLoginAttempt() public method

Get a benign login attempt to simulate
public BenignLoginAttempt ( System.DateTime eventTimeUtc ) : SimulatedLoginAttempt
eventTimeUtc System.DateTime
return SimulatedLoginAttempt

MaliciousAttemptToSantiizeIpViaAValidLogin() public method

Attacker login with correct accounts he has, trying to fool our service into thinking his IP is benign
public MaliciousAttemptToSantiizeIpViaAValidLogin ( IPAddress ipAddressToSanitizeThroughLogin ) : SimulatedLoginAttempt
ipAddressToSanitizeThroughLogin System.Net.IPAddress
return SimulatedLoginAttempt

MaliciousLoginAttemptBreadthFirst() public method

Attacker issues one guess by picking an benign account at random and picking a password by weighted distribution
public MaliciousLoginAttemptBreadthFirst ( System.DateTime eventTimeUtc ) : SimulatedLoginAttempt
eventTimeUtc System.DateTime
return SimulatedLoginAttempt

MaliciousLoginAttemptBreadthFirstAvoidMakingPopular() public method

Attacker issues one guess by picking an benign account at random and picking a password by weighted distribution
public MaliciousLoginAttemptBreadthFirstAvoidMakingPopular ( System.DateTime eventTimeUtc ) : SimulatedLoginAttempt
eventTimeUtc System.DateTime
return SimulatedLoginAttempt

MaliciousLoginAttemptWeighted() public method

Attacker issues one guess by picking an benign account at random and picking a password by weighted distribution
public MaliciousLoginAttemptWeighted ( System.DateTime eventTimeUtc ) : SimulatedLoginAttempt
eventTimeUtc System.DateTime
return SimulatedLoginAttempt

SimulatedLoginAttemptGenerator() public method

The attempt generator needs to know about the experimental configuration and have access to the sets of simulated accounts, IP addresses, and simulated passwords.
public SimulatedLoginAttemptGenerator ( ExperimentalConfiguration experimentalConfiguration, SimulatedAccounts simAccounts, IpPool ipPool, SimulatedPasswords simPasswords ) : System
experimentalConfiguration ExperimentalConfiguration
simAccounts SimulatedAccounts
ipPool IpPool
simPasswords SimulatedPasswords
return System

Property Details

ScheduledBenignAttempts public_oe property

public SortedSet ScheduledBenignAttempts
return SortedSet