Brent Cook
25731fee03
free utf8 conversion strings and avoid non-null terminated values
2015-06-04 09:00:24 -05:00
Brent Cook
c47c973b83
logon names can actually be up to 104 characters
...
practical limit is 64, this gives us margin
2015-06-04 08:53:09 -05:00
Brent Cook
773008d921
whitespace tweaks
2015-06-04 08:50:24 -05:00
David Maloney
2b07377328
fix copy error
...
use strncpy not memcpy to transfer the re-encoded
name and description into our account object.
also use sizeof for precise copy size. eliminates lingering
errors
MSP-12356
2015-06-02 12:44:49 -05:00
David Maloney
84cea10260
use all unicode for ntds account struct
...
force convert account name and description
to unicode for transport over the wire
MSP-12356
2015-06-02 12:35:30 -05:00
David Maloney
37e7ab2fc9
just a little more cleanup
...
this should hpefully address the last of Juan's code review
feedback appropriately.
MSP-12356
2015-05-18 11:21:10 -05:00
David Maloney
a3b4b53029
size and signedness issue fixes
...
fixes several size and signedness issues caught
during code review
MSP-12356
2015-05-18 11:08:58 -05:00
David Maloney
7c0c78d766
more missing garbage collection
...
pek structures also were not being garbage collected properly
MSP-12356
2015-05-18 10:46:43 -05:00
David Maloney
6c15c0c0a0
better garbage collection on initial setup
...
the ntds_parse method that gets everything started
was missing garbage collection for accountColumns.
MSP-12356
2015-05-18 10:43:27 -05:00
David Maloney
1bfd8526b6
Merge branch 'master' into feature/MSP-12356/ntds-parser
2015-05-14 10:55:55 -05:00
David Maloney
7e0c23e228
fixed missing type cast
...
needed explicit typecast for x64
MSP-12356
2015-05-13 14:54:32 -05:00
Brent Cook
e158093b38
Land #156 , final tweaks for multi-transport support
2015-05-12 22:35:59 -05:00
Brent Cook
567fc73bbc
Land #156 , multi transport support
2015-05-12 21:42:06 -05:00
Brent Cook
595d975337
quit concatenating serials after the first one
2015-05-12 21:31:36 -05:00
Brent Cook
716330ee7c
make machine_id on POSIX more resilient
...
Only compute the value once, this prevents changing if drive topology changes.
Consider ata and md drive prefixes.
Always set a MACHINE_ID value, upstream expects it in the reply.
2015-05-12 21:25:39 -05:00
OJ
6ee3b53786
Tweak transport change
...
Cosmetic stuff really.
2015-05-13 09:15:03 +10:00
OJ
98822709b5
Slight tweaks to proxy config function
2015-05-11 17:22:37 +10:00
OJ
44f581c0e7
Merge branch 'multi-transport-support' of github.com:OJ/meterpreter into multi-transport-support
2015-05-08 14:33:35 +10:00
OJ
70397a5c42
Only write socket when SSL comms in place
2015-05-08 14:32:12 +10:00
David Maloney
f3d0a7bdde
enable compression on our channel
...
since we will be sending lots of null bytes,
we want to make sure we make good use of compression
still doesn't solve our crash problems though
MSP-12356
2015-05-07 14:26:54 -05:00
David Maloney
f288256e19
remove all unneccsary callback stubs
...
channels seem to work fine without stubbed callbacks
removed all of these to eliminate them as a source
of this madness. evrything still works exactly as it did
before, which to say badly.
MSP-12356
2015-05-07 13:47:58 -05:00
David Maloney
7595156c90
make jet instance name unique
...
use date and time to make sure the Jet
Instance name is unique. Hasn't actually
solved our issue, but that name is supposed
to be unique anyways.
MSP-12356
2015-05-07 12:39:46 -05:00
David Maloney
2fa794f1c9
more cleanup/split up
...
split the date stuff up into their own subfunction tooo
MSP-12356
2015-05-06 14:00:15 -05:00
David Maloney
1daa927175
split off hash reading functions
...
moved the reading o the nt and lm hash records
into seperate sub functions. more cleanup/readability work
MSP-12356
2015-05-06 13:30:44 -05:00
David Maloney
bc5b6a1554
split off hash history reading
...
moved the hash history read into a seperate sub function
to make it easier to read
MSP-12356
2015-05-06 13:20:21 -05:00
David Maloney
879d062aa0
un typedef structs
...
bcook says to not typedef structs and just use them as
raw structs, so i have made that conversion here
MSP-12356
2015-05-06 11:24:06 -05:00
David Maloney
dff1a12c38
some more code cleanup
...
just some various bits and bobs here to make
the code a little cleaner and easier to read
MSP-12356
2015-05-06 10:42:03 -05:00
David Maloney
a8b4010ed0
cleanup #get_column_info a bit
...
bcook showed me how to do this the way i originally
wanted to but didn't know how. This is much cleaner to read
MSP-12356
2015-05-06 10:31:18 -05:00
David Maloney
df1181fe32
cleanup flag conversion
...
use simpler conversion of bit flags to
quasi-boolean values. just a little space saved and easier to read hopefully
MSP-12356
2015-05-06 09:54:36 -05:00
David Maloney
39d1860f7d
switch from malloc to calloc
...
calloc does our memory init for us
so all the malloc/memset usage was totally
redudnant
MSP-12356
2015-05-06 09:45:31 -05:00
David Maloney
9d1af4c696
add doxygen to new code
...
added doygen style comments to the new NTDS
functions and typedefs as requested by OJ.
MSP-12356
2015-05-05 13:32:32 -05:00
OJ
ff3121b6f7
Merge branch 'upstream/master' into multi-transport-support
...
Conflicts:
source/server/server_setup_posix.c
2015-05-05 20:55:26 +10:00
OJ
76b61f22d6
Update POSIX for configuration support
2015-05-05 08:58:21 +10:00
OJ
952bcd7f32
Add transport listing
2015-05-05 08:58:21 +10:00
Brent Cook
bfccf50c6b
disable debug by default
2015-05-05 08:58:21 +10:00
Brent Cook
4e2f6932db
remove duplicate check in SAFE_FREE
2015-05-05 08:58:21 +10:00
Brent Cook
c7617615e4
Land #155 , remove file and console output from kiwi
2015-05-04 15:10:16 -05:00
David Maloney
e0665a2ba5
add some additional function comments
...
add some basic function documentation in
the form of comments. not eprfect, but a start
on propper documentation
MSP-12356
2015-05-04 11:14:42 -05:00
David Maloney
dee9a5efab
some more code smell cleanup
...
bad memory cleanup issues around CAPI
and another constant for the length of a hash string
MSP-12356
2015-05-04 10:47:49 -05:00
David Maloney
8e93c26ce8
add constants for HASH Length
...
added constants for byte length of a hash
as well as athe null terminated length
MSP-12356
2015-05-04 10:41:48 -05:00
OJ
b5f5d0ae17
Remove console and file output from kiwi
...
This PR removes both log file and console output from kiwi. This is done so that those people who are unfortunate enough to migrate to a console app before running kiwi don't end up rendering all of the console output to a window that the user can see.
2015-05-04 09:14:37 +10:00
David Maloney
651e7a5135
Revert "Revert "Merge branch 'master' into feature/MSP-12356/ntds-parser""
...
This reverts commit 5a7d2ae84f830242486301cad0b26168f3ec973b.
2015-05-01 10:32:15 -05:00
David Maloney
a208343153
and again
...
another missing free
MSP-12356
2015-04-30 16:01:22 -05:00
David Maloney
c9cf6be97a
more memory cleanup
...
more missing free calls
MSP-12356
2015-04-30 15:43:58 -05:00
David Maloney
e2f4438dc4
do account reads in batches
...
a channel read on the ntds channel will now read
up to 20 accounts at a time. when we run out of accounts
we set the EOF flag to let the other side know
we are done
MSP-12356
2015-04-30 14:05:10 -05:00
David Maloney
8ff6ebab85
add channel close
...
the channel close will now initiate the jet engine
shutdown, and free the context
MSP-12356
2015-04-30 13:23:39 -05:00
David Maloney
5c1c9c317d
free the useraccount each time too
...
make sure we are doing good memory cleanup
MSP-12356
2015-04-30 13:18:55 -05:00
David Maloney
3ebf0513b0
properly cleanup memory around hash history
...
we were not freeing the buffers we created
as palceholders for decrypting hash history.
this would cause crashes when we wold start dealing
with multiple accounts in a row with a hash history.
freeing the buffers seems to fix the problem
MSP-12356
2015-04-30 13:15:17 -05:00
OJ
1c9c199e74
Fix up issues with transport hopping
...
Transport hopping checks for prev/next weren't right. Also, moving from TCP comms was resulting failure due to the fact that it's close to impossible to get Windows to flush the buffer to MSF prior to terminating the socket without doing all kinds of horrible stuff to the socket options (which would ultimately bloat the stagers).
Instead we rely on MSf to clean things up.
2015-04-30 22:39:24 +10:00
David Maloney
1612fce10c
Revert "Merge branch 'master' into feature/MSP-12356/ntds-parser"
...
This reverts commit 336fb48756942c73846f191135751e5d4e9b552d, reversing
changes made to be7e34858b88bbc816f208d16259b058c5819ad8.
2015-04-29 15:08:17 -05:00