-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add smb acceptance tests #19066
Add smb acceptance tests #19066
Conversation
07bebd8
to
cdce3b7
Compare
11bf682
to
7c39e9b
Compare
spec/acceptance/smb_spec.rb
Outdated
{ | ||
name: "auxiliary/scanner/smb/smb_lookupsid", | ||
platforms: [:linux, :osx, :windows], | ||
targets: [:session, :rhost], | ||
skipped: false, | ||
lines: { | ||
all: { | ||
required: [ | ||
"GROUP=None", | ||
"USER=nobody", | ||
"PIPE(LSARPC) LOCAL", | ||
], | ||
}, | ||
} | ||
}, | ||
{ | ||
name: "auxiliary/scanner/smb/pipe_auditor", | ||
platforms: [:linux, :osx, :windows], | ||
targets: [:session, :rhost], | ||
skipped: false, | ||
lines: { | ||
all: { | ||
required: [ | ||
/Pipes: (\\([a-zA-Z]*)(, )?)*/, | ||
], | ||
known_failures: [ | ||
/Inaccessible named pipe:/, | ||
/The server responded with an unexpected status code: STATUS_OBJECT_NAME_NOT_FOUND/, | ||
] | ||
}, | ||
} | ||
}, | ||
{ | ||
name: "auxiliary/scanner/smb/smb_enumshares", | ||
platforms: [:linux, :osx, :windows], | ||
targets: [:session, :rhost], | ||
skipped: false, | ||
lines: { | ||
all: { | ||
required: [ | ||
"modifiable - (DISK)", | ||
"readonly - (DISK)", | ||
"IPC$ - (IPC|SPECIAL) IPC Service", | ||
], | ||
}, | ||
} | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If these are flakey because we need to update them to use ruby_smb, we can comment them out for now - and as we migrate modules to use ruby_smb we can bring back these tests as part of the ruby_smb support PR
end | ||
|
||
ret = true | ||
ret &&= stdout.buf.include?('recursive') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker; these tests will be quite rigid - I wouldn't be able to run these tests against an arbitrary server for instance
7c39e9b
to
1084be4
Compare
1084be4
to
bf50da5
Compare
Release NotesAdds automated tests for multiple SMB modules |
This PR adds automated acceptance tests for SMB session & modules.
The steps for running the Docker container are:
Leaving in draft for now until the RubySMB timeout issue gets resolved.
Note: Trying to
sudo docker build .
in a Kali VM results in:Verification
List the steps needed to make sure this thing works
SMB_USERNAME=acceptance_tests_user SMB_PASSWORD=acceptance_tests_password SPEC_OPTS='--tag acceptance' SPEC_HELPER_LOAD_METASPLOIT=false bundle exec rspec ./spec/acceptance/smb_spec.rb