Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 209079 - net-fs/winexe remotely executes commands on Windows NT/2000/XP/2003 systems, with lmhash passthrough support
Summary: net-fs/winexe remotely executes commands on Windows NT/2000/XP/2003 systems, ...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement with 1 vote (vote)
Assignee: Default Assignee for New Packages
URL: http://eol.ovh.org/winexe/
Whiteboard: http://code.google.com/p/pentoo/sourc...
Keywords: EBUILD, InOverlay
Depends on:
Blocks:
 
Reported: 2008-02-06 04:15 UTC by Kury
Modified: 2014-05-03 20:10 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
winexe-071026.ebuild (winexe-071026.ebuild,676 bytes, text/plain)
2008-06-19 12:19 UTC, Benjamin Franzke
Details
winexe-07.10.26.ebuild (winexe-07.10.26.ebuild,669 bytes, text/plain)
2008-06-19 12:51 UTC, Benjamin Franzke
Details
Winexe SVN ebuild with PASS-THE-HASH patch (winexe-svn-1.0.ebuild,853 bytes, text/plain)
2008-09-10 13:11 UTC, Ruggero Marchei
Details
Winexe SVN PASS-THE-HASH patch from http://www.foofus.net/jmk/passhash.html (winexe-svn-10171-pth.patch,2.75 KB, patch)
2008-09-10 13:12 UTC, Ruggero Marchei
Details | Diff
Winexe SVN ebuild with PASS-THE-HASH patch (winexe-svn-1.0.ebuild,858 bytes, text/plain)
2008-09-10 14:12 UTC, Ruggero Marchei
Details
FILESDIR patch (still needed) (winexe-svn-service.patch,505 bytes, patch)
2010-09-08 11:31 UTC, Vieri
Details | Diff
bumped ebuild to sourceforge 0.91 version (winexe-0.91.ebuild,692 bytes, text/plain)
2011-05-15 12:09 UTC, Andreas Schürch
Details
sys-apps/winexe-1.00.ebuild (winexe-1.00.ebuild,774 bytes, text/plain)
2011-08-01 22:03 UTC, Bertrand Jacquin
Details
PASS-THE-HASH patch for latest git source (winexe-passthrough.patch,4.13 KB, patch)
2012-05-12 04:19 UTC, mitzip
Details | Diff
winexe-9999.ebuild from latest git sources (winexe-9999.ebuild,912 bytes, text/plain)
2012-05-12 04:24 UTC, mitzip
Details
sys-apps/winexe/winexe-9999.ebuild (winexe-9999.ebuild,1.68 KB, text/plain)
2014-04-27 21:34 UTC, Bertrand Jacquin
Details
sys-apps/winexe/files/9999-BUG-MEDIUM-Fix-NT_STATUS_SERVICE_DOES_NOT_EXIST-defi.patch (9999-BUG-MEDIUM-Fix-NT_STATUS_SERVICE_DOES_NOT_EXIST-defi.patch,1.22 KB, patch)
2014-04-27 21:35 UTC, Bertrand Jacquin
Details | Diff
sys-apps/winexe/winexe-9999.ebuild (winexe-9999.ebuild,1.68 KB, text/plain)
2014-04-28 12:15 UTC, Bertrand Jacquin
Details
net-misc/winexe/winexe-1.00.ebuild (file_209079.txt,1.00 KB, text/plain)
2014-05-02 16:22 UTC, Tom Wijsman (TomWij) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kury 2008-02-06 04:15:24 UTC
Allows programs to be remotely executed on MS Windows via the $IPC share.
Here is there homepage/source code:  http://eol.ovh.org/winexe/

This Winexe program is a replacement for the SystemInternals program called 'psexec'
Which is now part of the evil empire :(
http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx



Reproducible: Always
Comment 1 Benjamin Franzke 2008-06-19 12:19:15 UTC
Created attachment 157601 [details]
winexe-071026.ebuild
Comment 2 Benjamin Franzke 2008-06-19 12:51:15 UTC
Created attachment 157611 [details]
winexe-07.10.26.ebuild
Comment 3 Ruggero Marchei 2008-09-10 13:11:25 UTC
Created attachment 165102 [details]
Winexe SVN ebuild with PASS-THE-HASH patch
Comment 4 Ruggero Marchei 2008-09-10 13:12:25 UTC
Created attachment 165103 [details, diff]
Winexe SVN PASS-THE-HASH patch from http://www.foofus.net/jmk/passhash.html
Comment 5 Ruggero Marchei 2008-09-10 14:12:47 UTC
Created attachment 165121 [details]
Winexe SVN ebuild with PASS-THE-HASH patch

ebuild now uses ESVN_BOOTSTRAP
Comment 6 Christopher Smith 2009-02-19 18:58:15 UTC
This doens't work for me with autoconf >2.59.
Comment 7 Eric Johnson 2009-08-20 18:23:20 UTC
not having success with this one. seem to be getting a circular dependency:

from /var/tmp/portage/app-misc/winexe-svn-1.0/temp/build.log:

>>> Unpacking source...
 * subversion update start -->
 *      repository: http://dev.zenoss.org/svn/trunk/wmi/Samba/source
At revision 14621.
 *    working copy: /usr/portage/distfiles/svn-src/winexe/source

 * apply patches -->
 * Applying winexe-svn-10171-pth.patch ...                                                                                    [ ok ]

 * begin bootstrap -->
 *    bootstrap with a file: autogen.sh
./autogen.sh: running script/mkversion.sh
./script/mkversion.sh: 'version.h' created for Samba("4.0.0tp4-SVN-build-UNKNOWN")
./autogen.sh: running autoheader -I. -Ilib/replace
build/m4/check_cc.m4:8: error: AC_REQUIRE: circular dependency of AC_GNU_SOURCE
lib/replace/autoconf-2.60.m4:169: AC_USE_SYSTEM_EXTENSIONS is expanded from...
../../lib/autoconf/specific.m4:332: AC_GNU_SOURCE is expanded from...
lib/replace/autoconf-2.60.m4:169: AC_USE_SYSTEM_EXTENSIONS is expanded from...
build/m4/check_cc.m4:8: the top level
autom4te-2.63: /usr/bin/m4 failed with exit status: 1
autoheader-2.63: '/usr/bin/autom4te-2.63' failed with exit status: 1
 * 
 * ERROR: app-misc/winexe-svn-1.0 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_unpack
 *             environment, line 2212:  Called subversion_src_unpack
 *             environment, line 2477:  Called subversion_bootstrap
 *             environment, line 2323:  Called die
 * The specific snippet of code:
 *               eval "./${ESVN_BOOTSTRAP}" || die "${ESVN}: can't execute ESVN_BOOTSTRAP.";
 *  The die message:
 *   subversion: can't execute ESVN_BOOTSTRAP.
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/app-misc/winexe-svn-1.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-misc/winexe-svn-1.0/temp/environment'.
 * This ebuild is from an overlay: '/usr/local/portage/'
Comment 8 Eric Johnson 2009-08-20 18:23:44 UTC
Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.29-gentoo-r5 i686)
=================================================================
System uname: Linux-2.6.29-gentoo-r5-i686-Intel-R-_Pentium-R-_4_CPU_3.20GHz-with-glibc2.0
Timestamp of tree: Tue, 18 Aug 2009 22:45:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.5.4-r3
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ ftp://ftp.wallawalla.edu/pub/mirrors/ftp.gentoo.org ftp://gentoo.arcticnetwork.ca/pub/gentoo/"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X acl acpi alsa bash-completion berkdb bindist branding bzip2 cairo caps cdr cli cracklib crypt css cups dbus dga dri dvd dvdr dvdread encode fam flac fortran gdbm gif gpm hal iconv imap ipv6 isdnlog jabber java java6 javascript jpeg latex libnotify mad mikmod mmx mmxext mp3 mpeg mudflap ncurses nls nptl nptlonly nvidia ogg opengl openmp pam pcre pdf perl php png pppd python rdeskop readline reflection ruby sdl session smp spell spl sse2 ssl svg sysfs tcpd tiff truetype unicode usb vorbis wifi win32codecs x86 xine xinerama xml xorg xscreensaver xv xvid xvmc zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia vesa vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 9 Vieri 2010-09-08 11:31:48 UTC
Created attachment 246446 [details, diff]
FILESDIR patch (still needed)
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-09-11 13:07:24 UTC
The HOMEPAGE seems dead. Could you update it?
Comment 11 Milos Ivanovic 2011-02-07 03:47:00 UTC
I tried to update the homepage but I got an error saying on the reporter and/or maintainer can do that.

This is amazing software and it would be more than fantastic if it could be added to the portage tree ASAP :)

Thanks a lot to all the devs and (to-be?) maintaners.
Comment 12 Milos Ivanovic 2011-02-07 03:47:35 UTC
By the way, the new homepage is http://winexe.sourceforge.net/ :)
Comment 13 Andreas Schürch gentoo-dev 2011-05-15 12:09:36 UTC
Created attachment 273255 [details]
bumped ebuild to sourceforge 0.91 version

I bumped and adjusted the ebuild to the new version and location.
The filesdir patch seems still valid... so place it as filesdir.patch in $OVERLAY/app-misc/winexe/files

I only tested it on x86 so far...

Have fun!
Comment 14 Bertrand Jacquin 2011-08-01 22:03:19 UTC
Created attachment 281781 [details]
sys-apps/winexe-1.00.ebuild

winexe-1.00 update
Comment 15 mitzip 2012-05-12 04:19:26 UTC
Created attachment 311471 [details, diff]
PASS-THE-HASH patch for latest git source

Updated pass-the-hash patch that works with winexe-9999.ebuild.
Comment 16 mitzip 2012-05-12 04:24:23 UTC
Created attachment 311473 [details]
winexe-9999.ebuild from latest git sources

Builds from latest sourceforge git repo for winexe. Tested on amd64 gentoo box communicating with windows 7.

Needs PASS-THE-HASH patch found here:
https://bugs.gentoo.org/attachment.cgi?id=311471&action=edit

Observed Status Update:

- Both the eol.ovh.org and the sourceforge appear to be down, project on sf.net still going.
- the FILESDIR patch breaks things now, works great without it
Comment 17 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-09-01 19:56:56 UTC
Bertrand Jacquin wants to step up as a proxied maintainer for this package, as he has let me know by e-mail; does one of the other contributors want to join him with maintaining this package? I'm planning to review the attached files soon.

Gentoo has a dedicated team[1] for assisting users in maintaining orphaned
packages. If you are interested in maintaining this package, please comment on this bug or contact proxy-maint@gentoo.org.

[1]: http://www.gentoo.org/proj/en/qa/proxy-maintainers/index.xml
Comment 18 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2014-04-26 13:12:08 UTC
Bertrand, can you check if the attached files or what is in Pentoo is alright?
Comment 19 Bertrand Jacquin 2014-04-27 21:34:45 UTC
Created attachment 375904 [details]
sys-apps/winexe/winexe-9999.ebuild

Here is a refresh from recent git

 - use WAF build system
 - remove non necessary gnutls USE flag
 - remove non necessary net-libs/gnutls and dev-libs/cyrus-sasl DEPEND
 - mingw (32 and 64) are needed to build, so pkg_pretend() to find them
 - refresh NT_STATUS_SERVICE_DOES_NOT_EXIST patch to valid one
Comment 20 Bertrand Jacquin 2014-04-27 21:35:29 UTC
Created attachment 375906 [details, diff]
sys-apps/winexe/files/9999-BUG-MEDIUM-Fix-NT_STATUS_SERVICE_DOES_NOT_EXIST-defi.patch

BUG/MEDIUM: Fix NT_STATUS_SERVICE_DOES_NOT_EXIST definition
Comment 21 Bertrand Jacquin 2014-04-28 12:14:36 UTC
Other things, I did not report the static USE flag, as I don't have any needs for that and it make the build more complicated. Also it only link samba statically and not with other libraries needed by winexe (like popt). net-fs/samba does not provide any static lib, and I don't want to use different samba version/patchs/flags used to build net-fs/samba and winexe. I also don't want to redo the work done in samba ebuild. For static support in winexe, samba should first provide static-lib we can use as-is.

The PASS-THE-HASH patch apply to samba, not to winexe, so is not part of the scope. Does this still apply with samba4 ?

The pentoo ebuild DEPEND on dev-util/mingw64-runtime which is wrong as a mingw-gcc is needed. It also DEPEND on net-libs/gnutls, dev-libs/cyrus-sasl which are not used anymore. It DEPEND on dev-libs/libbsd which is only used for static build. The pentoo ebuild does not inherit waf-utils.
Comment 22 Bertrand Jacquin 2014-04-28 12:15:23 UTC
Created attachment 375946 [details]
sys-apps/winexe/winexe-9999.ebuild

Fix a bad MINGW32 (s/i486/i586)
Comment 23 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2014-05-02 16:22:43 UTC
Created attachment 376252 [details]
net-misc/winexe/winexe-1.00.ebuild

List of changes:

- Corrected ebuild header (missing line)
- Changed to EAPI 5
- Removed || die as that's no longer needed for the e* functions in later EAPIs.
- Changed category to net-misc.
- Replaced autogen.sh by AT_M4DIR="../lib/replace" eautoreconf.
- Swapped DEPEND and RDEPEND.
- Added missing dependencies to RDEPEND (from configure.ac).
- flag-o-matic dropped, doesn't appear to be used.
- Using ${S} in S="..." causes a loop, use ${WORKDIR} instead.

There are more dependencies missing (from config files that are included in configure.ac; also perhaps nss, definitely Perl and Python), some dependencies might need to be made optional.

Currently stuck at the following "Can't locate ..." error:

Creating heimdal/lib/asn1/der-protos.h
Use of "do" to call subroutines is deprecated at heimdal/cf/make-proto.pl line 15.
Can't locate getopts.pl in @INC (@INC contains: /etc/perl /usr/local/lib64/perl5/5.18.2/x86_64-linux /usr/local/lib64/perl5/5.18.2 /usr/lib64/perl5/vendor_perl/5.18.2/x86_64-linux /usr/lib64/perl5/vendor_perl/5.18.2 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl/5.18.1 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.18.2/x86_64-linux /usr/lib64/perl5/5.18.2 .) at heimdal/cf/make-proto.pl line 5.
data.mk:195: recipe for target 'heimdal/lib/asn1/der-protos.h' failed

It might be the case that my Perl install is broken; but given the lack of Perl dependencies, it might just as well be the case that a Perl dependency misses.
Comment 24 Bertrand Jacquin 2014-05-03 12:57:59 UTC
(In reply to Tom Wijsman (TomWij) from comment #23)
> Created attachment 376252 [details]
> net-misc/winexe/winexe-1.00.ebuild
> 
> List of changes:
> 
> - Corrected ebuild header (missing line)
> - Changed to EAPI 5
> - Removed || die as that's no longer needed for the e* functions in later
> EAPIs.
> - Changed category to net-misc.
> - Replaced autogen.sh by AT_M4DIR="../lib/replace" eautoreconf.
> - Swapped DEPEND and RDEPEND.
> - Added missing dependencies to RDEPEND (from configure.ac).
> - flag-o-matic dropped, doesn't appear to be used.
> - Using ${S} in S="..." causes a loop, use ${WORKDIR} instead.

Ok, these are mostly the same changes I did in ebuild in my overlay. Just one bad thing about dependencies, DEPEND include itself instead of RDEPEND.

> There are more dependencies missing (from config files that are included in
> configure.ac; also perhaps nss, definitely Perl and Python), some
> dependencies might need to be made optional.

It is really needed that we try to implement once more what was done for pre-samba 4 release ? winexe 1.00 has a 4.0.0alpha11 shipped in while winexe 9999 depend on a system installed samba4.

Writing a complete ebuild to winexe-1.00 is almost redo a samba ebuild which have a lot of specific case we don't see for now

Imho, it's about a time loss here while you could snapshot the live release. Don't you think ?
Comment 25 Rick Farina (Zero_Chaos) gentoo-dev 2014-05-03 16:59:56 UTC
(In reply to Bertrand Jacquin from comment #24)

> Writing a complete ebuild to winexe-1.00 is almost redo a samba ebuild which
> have a lot of specific case we don't see for now
> 
I agree, we don't need this

> Imho, it's about a time loss here while you could snapshot the live release.
> Don't you think ?

Yes, snapshot the live release is fine for me.
Comment 26 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2014-05-03 20:10:16 UTC
(In reply to Rick Farina (Zero_Chaos) from comment #25)
> Yes, snapshot the live release is fine for me.

+1 as from what I remember seeing, working out 1.00 would be a lot of work; I'll try to review and snapshot 9999 later. If someone else wants to, welcome.