Commit Graph

156 Commits

Author SHA1 Message Date
Dirk de la Hunt 5d455454de Fix potential memory leak in console.c
CAUTION: untested as my openssl installation has gone insane.

If the incoming "hScreen" parameter is NULL, a new PSCREEN_RECORD is
allocated to use in its place.
However, if the allocation of the "pScreenBuf" member variable fails,
the function returns, potentially leaking the newly allocated
PSCREEN_RECORD.

This fix first checks to see if the functions owns the "pScreenRec", and
if so, frees it before returning.
2015-10-22 20:04:14 +02:00
quamrulmina 89452c8a2f There shouldn't be any "*" when entering a password or passphrase
There shouldn't be any "*" when entering a password or passphrase for
better security. Linux/Unix openssh works the same way - without any
"*". Great suggestion by Mark Hahnel in comments of Issue #5
2015-10-20 19:23:18 -05:00
quamrulmina de4ae13f76 ssh.exe client sends current window size and TERM value when pty-req is made
This was not coded before for Win32 port. Remote sshd server is now
aware of our client's screen size and VT/ANSI TERM emulation.
2015-10-20 18:25:06 -05:00
arif-pragmasys f1d8b2e72d add temp key files to ignore list 2015-10-20 14:28:23 -05:00
arif-pragmasys 9d68c58a02 remove key files as they are generated when needed 2015-10-20 14:26:29 -05:00
arif-pragmasys e2beaa0cc1 add key files to ignore list 2015-10-20 13:51:56 -05:00
arif-pragmasys 7e326eba4a remove key files, since they are supposed to be generated as needed 2015-10-20 13:51:07 -05:00
Manoj Ampalam c636c1ec17 Merged README.md 2015-10-20 10:09:00 -07:00
quamrulmina 2cfb138bb8 Add local shell access feature in sftp.exe client
This was not implemented before in Win32. !takes to the windows shell
and !command runs the command in Windows shell. exit brings the user
back to sftp like in Linux/Unix shell.
2015-10-19 17:56:08 -05:00
Steve Lee 98dc596200 Update README.md 2015-10-19 12:42:39 -07:00
arif-pragmasys ac42afd122 Path correction for lib bcrypt 2015-10-18 22:25:41 -05:00
arif-pragmasys bafc1df7c5 CTR and CBC mode CNG ciphers replacing OpenSSL ciphers 2015-10-17 11:09:01 -05:00
arif-pragmasys d59177d82e exclude temp files 2015-10-16 15:47:12 -05:00
arif-pragmasys 2138a4acaf make files are autogenerated 2015-10-16 15:30:42 -05:00
quamrulmina 7aac59e524 Add ANSI parsing engine and console draw support to ssh client
Makes the ssh.exe client more useable in interactive mode with ANSI
color and a console screen support.
2015-10-15 17:25:39 -05:00
Steve Lee a55816fc15 Update README
Added link to wiki
2015-10-14 13:45:46 -07:00
quamrulmina 44a6f54fc4 sshd updates USERDOMAIN env variable correctly
USERDOMAIN environment variable was not being updated by sshd before s
shell or subsystem was started, hence it was left pointing to local
logged on user;'s domain. Now we set it correctly for the remote ssh
user's domain or local account
2015-10-12 23:58:57 -05:00
quamrulmina ded4138b58 sshd server puts remote user@target in the console prompt
Usability improvement fix ( issue #6 ). sshd.exe puts remote user and
host info on the console prompt. user@target $P$G is set as cmd.exe
PROMPT via environment variable.
2015-10-12 22:53:21 -05:00
quamrulmina 9fa909e3df Remote directory on sftp logon is set to user's home directory #7
Fix the reported problem #7. Remote directory set to remote user's home
directory like its is done on openssh on all platforms. Users can then
cd to "Documents" directory. Actual fix was to expand "." to user's home
directory so that pwd showed it correctly rather than just showing a
dot.
2015-10-12 19:24:12 -05:00
arif-pragmasys 7f3709e11f config file to made dsa key auth work 2015-10-12 17:24:46 -05:00
quamrulmina 55f2ec6825 Add pty mode support code
Pty mode code added so that sshd server can do remote echo, backspace
processing. etc and ssh.exe client does not have to do local echo. We
can enrich it in future for more features and allowing programs like
powershell to run interactive. Pty mode is central for interactive use
and will be built using Windows console instead of termios that
Linux/Unix uses.
2015-10-12 13:49:15 -05:00
quamrulmina b72c36c802 Fix USERNAME env variable not set correctly
USERNAME environment variable is set correctly with the remote logged on
username.
2015-10-11 02:38:44 -05:00
quamrulmina 5c3dc0554f Fixed Wrong user profile folder created on first logon through ssh problem
Fixed this #3 problem ticket. We determine domain hostname which created
the authenticated token from the token and then pass it to
LoadUserProfile() Windows API which now correctly creates the user's
home directory name and profile folder.
2015-10-10 19:26:39 -05:00
quamrulmina 47df66126a configure file needed unix style LF format
configure file had Windows DOS style CRLF, but needs to have LF format
2015-10-09 12:11:58 -05:00
quamrulmina f384477c6d ssh client creates .ssh directory and points to well defined files relative to user home directory
Will fix problems like new hosts to be added to known_hosts file which
was failing when .ssh directory did not exist. Also default user's
public keys like id_rsa pairs are picked up properly from the user's
homdir/.ssh base.
2015-10-08 21:52:24 -05:00
arif-pragmasys 673d697444 remove zlib and libssp dependency 2015-10-07 17:03:43 -05:00
quamrulmina 5655e833c9 Ignore test generated data files
ignore test run output files
2015-10-07 14:19:22 -05:00
quamrulmina 545dda2c8b Add ANSI processing in ssh client pty code to detect LF to CRLF mode
Whether LF should be changed to CR-LF is determined by what the remote
sshd server wants. Sequences like ESC[20h is sent by sshd servers in pty
ANSI mode. Unix servers usually want LF and Windows servers CR-LF. Added
simple ANSI data check now for pty use in interactive mode. Need to
expand to simple ANSI engine in future for processing other ANSI
terminal attributes.
2015-10-07 14:06:44 -05:00
arif-pragmasys 522af1564b fix file open() and fstat() issues in tests 2015-10-05 21:22:05 -05:00
quamrulmina ac89e98293 add pty support to ssh client
pty and tty support was not enabled or working in the code. Without pty
support, ssh client was very non functional - e.g. openssh linux server
prompt would not come through. Now ssh client works much better in
interactive mode ( uses pty).
2015-10-05 15:46:37 -05:00
quamrulmina 989b8a9f01 improved sshd child monitor code to avoid annoying "broken pipe" msg from Linux clients
take child detection handle out from select mux after a child process is
detected to have exited so that other code exit handlings can run its
course
2015-10-02 18:35:08 -05:00
quamrulmina 1915208a54 Fixed sshd process not ending when sftp-server and the shell ended
NoMachine did not finish coding child process ending detection logic.
Added the needed code so that child process handle is added to the
handles that WaitForMultipleObjects() waits for in nomachine select()
implementation in socket.c. Otherwise select() would be stuck in
read/write dectection even when the process of interest has exited.
2015-10-02 14:18:49 -05:00
quamrulmina 3f71c81f49 sftp-server.exe put now works
Fixed sftp-server put verb not working. Tested from out sftp client and
linux fedora openssh 6.9p1 sftp clients in transferring small and large
files using both get and put verbs.
2015-10-01 19:54:56 -05:00
quamrulmina 6b70a283cb sshd.exe hostkeys loading fix
sshd.exe would not find ssh_host keys without this change. Chnage made
for test running reveresed
2015-10-01 01:20:04 -05:00
quamrulmina cae05764b0 fix sftp.exe client to transfer files in binary mode
sftp.exe client were adding crlf to each lines of files. It should
transfer in binary mode. set O_BINARY flag on in _open calls.
2015-10-01 01:17:11 -05:00
quamrulmina 5b06ebbbb5 sftp-server.exe first code drop that works
sftp-server.exe code modified to work in Windows as NoMachine never
finished it to work. I/O handling to work as a subsystem and
openssh7.1p1 sshbuf_new() buffer system code had to be used. sshd_config
file need location of sftp subsystem to be specified.
2015-09-30 20:26:32 -05:00
arif-pragmasys df2ea3875e test directory structure image 2015-09-30 17:19:05 -05:00
arif-pragmasys aa2a62ddde regress test related make file update for win32 2015-09-30 17:06:44 -05:00
arif-pragmasys 044abadd35 fix end of line for fixalgorithm 2015-09-30 16:56:56 -05:00
arif-pragmasys 9a59a33c76 increase test coverage 2015-09-30 16:24:06 -05:00
arif-pragmasys 92eae9ee02 7.1p1 original test files 2015-09-29 13:59:44 -05:00
quamrulmina 720b3620fa sftp.exe/ssh.exe - write new line after a password is read in non-echo mode
ssh.exe when invoked from sftp.exe and scp.exe external progam needs to
show a newline after data read after a prompt for next data to look
proper
2015-09-28 01:01:27 -05:00
quamrulmina 6d167ae0f6 fix sftp.exe client to work using password authentication
ssh.exe client invoked underneath was not able to send password prompt
and read password from user as stdin and stdout handles were redirected
to sockets by sftp.exe ; stderr which is not redirected is used to show
prompt to users and data is read from console
2015-09-27 23:54:10 -05:00
arif-pragmasys 0d3a933c2a custom ssh and sshd config for win32 2015-09-23 14:51:40 -05:00
arif-pragmasys 2e710ab203 changed ssh_config default settings to allow dsa keys. 2015-09-23 14:38:33 -05:00
arif-pragmasys 0faa40eae3 sshd.exe bug fix, freeing same buffer twice 2015-09-23 01:00:20 -05:00
arif-pragmasys eb2f68ccae sshd works as a service on windows 2015-09-21 20:34:49 -05:00
arif-pragmasys 6b2d437a8f Makefile template change to accomodate 7.1p1 changes 2015-09-21 16:22:07 -05:00
arif-pragmasys f4b56e2280 nomachine + additional changes applied to openssh 7.1p1 source base 2015-09-21 16:03:51 -05:00
arif-pragmasys 47c23e53d7 screenshots for debugger setup 2015-09-19 14:09:29 -05:00