Skip to content

Commit e02fc36

Browse files
committed
Update to handle larger passwords
1 parent a7135e9 commit e02fc36

File tree

5 files changed

+424
-3
lines changed

5 files changed

+424
-3
lines changed

.gitignore

Lines changed: 287 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,287 @@
1+
.svn
2+
*.tmf
3+
*.mof
4+
# sorry, I cannot provide a kernel mode signed driver for this !
5+
# purchase one and build the driver
6+
*.x64
7+
*.x86
8+
9+
## Ignore Visual Studio temporary files, build results, and
10+
## files generated by popular Visual Studio add-ons.
11+
##
12+
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
13+
14+
# User-specific files
15+
*.suo
16+
*.user
17+
*.userosscache
18+
*.sln.docstates
19+
20+
# User-specific files (MonoDevelop/Xamarin Studio)
21+
*.userprefs
22+
23+
# Build results
24+
[Dd]ebug/
25+
[Dd]ebugPublic/
26+
[Rr]elease/
27+
[Rr]eleases/
28+
x64/
29+
x86/
30+
bld/
31+
[Bb]in/
32+
[Oo]bj/
33+
[Ll]og/
34+
35+
# Visual Studio 2015 cache/options directory
36+
.vs/
37+
# Uncomment if you have tasks that create the project's static files in wwwroot
38+
#wwwroot/
39+
40+
# MSTest test Results
41+
[Tt]est[Rr]esult*/
42+
[Bb]uild[Ll]og.*
43+
44+
# NUNIT
45+
*.VisualState.xml
46+
TestResult.xml
47+
48+
# Build Results of an ATL Project
49+
[Dd]ebugPS/
50+
[Rr]eleasePS/
51+
dlldata.c
52+
53+
# .NET Core
54+
project.lock.json
55+
project.fragment.lock.json
56+
artifacts/
57+
**/Properties/launchSettings.json
58+
59+
*_i.c
60+
*_p.c
61+
*_i.h
62+
*.ilk
63+
*.meta
64+
*.obj
65+
*.pch
66+
*.pdb
67+
*.pgc
68+
*.pgd
69+
*.rsp
70+
*.sbr
71+
*.tlb
72+
*.tli
73+
*.tlh
74+
*.tmp
75+
*.tmp_proj
76+
*.log
77+
*.vspscc
78+
*.vssscc
79+
.builds
80+
*.pidb
81+
*.svclog
82+
*.scc
83+
84+
# Chutzpah Test files
85+
_Chutzpah*
86+
87+
# Visual C++ cache files
88+
ipch/
89+
*.aps
90+
*.ncb
91+
*.opendb
92+
*.opensdf
93+
*.sdf
94+
*.cachefile
95+
*.VC.db
96+
*.VC.VC.opendb
97+
98+
# Visual Studio profiler
99+
*.psess
100+
*.vsp
101+
*.vspx
102+
*.sap
103+
104+
# TFS 2012 Local Workspace
105+
$tf/
106+
107+
# Guidance Automation Toolkit
108+
*.gpState
109+
110+
# ReSharper is a .NET coding add-in
111+
_ReSharper*/
112+
*.[Rr]e[Ss]harper
113+
*.DotSettings.user
114+
115+
# JustCode is a .NET coding add-in
116+
.JustCode
117+
118+
# TeamCity is a build add-in
119+
_TeamCity*
120+
121+
# DotCover is a Code Coverage Tool
122+
*.dotCover
123+
124+
# Visual Studio code coverage results
125+
*.coverage
126+
*.coveragexml
127+
128+
# NCrunch
129+
_NCrunch_*
130+
.*crunch*.local.xml
131+
nCrunchTemp_*
132+
133+
# MightyMoose
134+
*.mm.*
135+
AutoTest.Net/
136+
137+
# Web workbench (sass)
138+
.sass-cache/
139+
140+
# Installshield output folder
141+
[Ee]xpress/
142+
143+
# DocProject is a documentation generator add-in
144+
DocProject/buildhelp/
145+
DocProject/Help/*.HxT
146+
DocProject/Help/*.HxC
147+
DocProject/Help/*.hhc
148+
DocProject/Help/*.hhk
149+
DocProject/Help/*.hhp
150+
DocProject/Help/Html2
151+
DocProject/Help/html
152+
153+
# Click-Once directory
154+
publish/
155+
156+
# Publish Web Output
157+
*.[Pp]ublish.xml
158+
*.azurePubxml
159+
# TODO: Comment the next line if you want to checkin your web deploy settings
160+
# but database connection strings (with potential passwords) will be unencrypted
161+
*.pubxml
162+
*.publishproj
163+
164+
# Microsoft Azure Web App publish settings. Comment the next line if you want to
165+
# checkin your Azure Web App publish settings, but sensitive information contained
166+
# in these scripts will be unencrypted
167+
PublishScripts/
168+
169+
# NuGet Packages
170+
*.nupkg
171+
# The packages folder can be ignored because of Package Restore
172+
**/packages/*
173+
# except build/, which is used as an MSBuild target.
174+
!**/packages/build/
175+
# Uncomment if necessary however generally it will be regenerated when needed
176+
#!**/packages/repositories.config
177+
# NuGet v3's project.json files produces more ignorable files
178+
*.nuget.props
179+
*.nuget.targets
180+
181+
# Microsoft Azure Build Output
182+
csx/
183+
*.build.csdef
184+
185+
# Microsoft Azure Emulator
186+
ecf/
187+
rcf/
188+
189+
# Windows Store app package directories and files
190+
AppPackages/
191+
BundleArtifacts/
192+
Package.StoreAssociation.xml
193+
_pkginfo.txt
194+
195+
# Visual Studio cache files
196+
# files ending in .cache can be ignored
197+
*.[Cc]ache
198+
# but keep track of directories ending in .cache
199+
!*.[Cc]ache/
200+
201+
# Others
202+
ClientBin/
203+
~$*
204+
*~
205+
*.dbmdl
206+
*.dbproj.schemaview
207+
*.jfm
208+
*.pfx
209+
*.publishsettings
210+
orleans.codegen.cs
211+
212+
# Since there are multiple workflows, uncomment next line to ignore bower_components
213+
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
214+
#bower_components/
215+
216+
# RIA/Silverlight projects
217+
Generated_Code/
218+
219+
# Backup & report files from converting an old project file
220+
# to a newer Visual Studio version. Backup files are not needed,
221+
# because we have git ;-)
222+
_UpgradeReport_Files/
223+
Backup*/
224+
UpgradeLog*.XML
225+
UpgradeLog*.htm
226+
227+
# SQL Server files
228+
*.mdf
229+
*.ldf
230+
231+
# Business Intelligence projects
232+
*.rdl.data
233+
*.bim.layout
234+
*.bim_*.settings
235+
236+
# Microsoft Fakes
237+
FakesAssemblies/
238+
239+
# GhostDoc plugin setting file
240+
*.GhostDoc.xml
241+
242+
# Node.js Tools for Visual Studio
243+
.ntvs_analysis.dat
244+
node_modules/
245+
246+
# Typescript v1 declaration files
247+
typings/
248+
249+
# Visual Studio 6 build log
250+
*.plg
251+
252+
# Visual Studio 6 workspace options file
253+
*.opt
254+
255+
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
256+
*.vbw
257+
258+
# Visual Studio LightSwitch build output
259+
**/*.HTMLClient/GeneratedArtifacts
260+
**/*.DesktopClient/GeneratedArtifacts
261+
**/*.DesktopClient/ModelManifest.xml
262+
**/*.Server/GeneratedArtifacts
263+
**/*.Server/ModelManifest.xml
264+
_Pvt_Extensions
265+
266+
# Paket dependency manager
267+
.paket/paket.exe
268+
paket-files/
269+
270+
# FAKE - F# Make
271+
.fake/
272+
273+
# JetBrains Rider
274+
.idea/
275+
*.sln.iml
276+
277+
# CodeRush
278+
.cr/
279+
280+
# Python Tools for Visual Studio (PTVS)
281+
__pycache__/
282+
*.pyc
283+
284+
# Cake - Uncomment if you are using it
285+
# tools/**
286+
# !tools/packages.config
287+
*.dll

DetectPasswordViaNTLMInFlow.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,8 @@ int _tmain(int argc, _TCHAR* argv[])
559559
// password len expected between 6 and 10
560560
// this is a CPU optimization
561561
minPasswordLen = 6;
562-
maxPasswordLen = 10;
562+
maxPasswordLen = 16;
563+
printf("Using min password length = %d and max password length = %d\r\n",minPasswordLen, maxPasswordLen);
563564
if (!GetNTLMChallengeAndResponse())
564565
{
565566
printf("Unable to Get NTLM Challenge And Response\r\n");
@@ -568,7 +569,7 @@ int _tmain(int argc, _TCHAR* argv[])
568569
printf("Use SSPI to get a valid NTLM challenge/response and test passwords\r\n");
569570
printf("vincent.letoux@mysmartlogon.com\r\n");
570571
printf("\r\n");
571-
printf("[+] got NTLM challenge/response\r\n", dwClientChallengeSize);
572+
printf("[+] got NTLM challenge/response\r\n");
572573

573574
DWORD passwordInBuffer = 0;
574575
WCHAR passwords[MAX_CONFIGURABLE_PASSWORD_LEN][MAX_CONFIGURABLE_PASSWORD_LEN] = {0};
@@ -577,7 +578,7 @@ int _tmain(int argc, _TCHAR* argv[])
577578
BOOL fContinue = TRUE;
578579
HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE);
579580

580-
while(fContinue)
581+
while(fContinue)
581582
{
582583
CHAR c = 0;
583584
DWORD dwRead = 0;

DetectPasswordViaNTLMInFlow.sln

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2012
4+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DetectPasswordViaNTLMInFlow", "DetectPasswordViaNTLMInFlow.vcxproj", "{EDDADEB9-FBD3-4DE3-9BE8-CF355F0EFC3E}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|Win32 = Debug|Win32
9+
Release|Win32 = Release|Win32
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{EDDADEB9-FBD3-4DE3-9BE8-CF355F0EFC3E}.Debug|Win32.ActiveCfg = Debug|Win32
13+
{EDDADEB9-FBD3-4DE3-9BE8-CF355F0EFC3E}.Debug|Win32.Build.0 = Debug|Win32
14+
{EDDADEB9-FBD3-4DE3-9BE8-CF355F0EFC3E}.Debug|Win32.Deploy.0 = Debug|Win32
15+
{EDDADEB9-FBD3-4DE3-9BE8-CF355F0EFC3E}.Release|Win32.ActiveCfg = Release|Win32
16+
{EDDADEB9-FBD3-4DE3-9BE8-CF355F0EFC3E}.Release|Win32.Build.0 = Release|Win32
17+
{EDDADEB9-FBD3-4DE3-9BE8-CF355F0EFC3E}.Release|Win32.Deploy.0 = Release|Win32
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal

0 commit comments

Comments
 (0)