vlmcsd.8.dos.txt 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. VLMCSD(8) KMS Activation Manual VLMCSD(8)
  2. NAME
  3. vlmcsd - a fully Microsoft compatible KMS server
  4. SYNOPSIS
  5. vlmcsd [ options ]
  6. DESCRIPTION
  7. vlmcsd is a fully Microsoft compatible KMS server that provides product
  8. activation services to clients. It is meant as a drop-in replacement
  9. for a Microsoft KMS server (Windows computer with KMS key entered). It
  10. currently supports KMS protocol versions 4, 5 and 6.
  11. vlmcsd is designed to run on POSIX compatible operating systens. It
  12. only requires a basic C library with a BSD-style sockets API and either
  13. fork(2) or pthreads(7). That allows it to run on most embedded systems
  14. like routers, NASes, mobile phones, tablets, TVs, settop boxes, etc.
  15. Some efforts have been made that it also runs on Windows.
  16. Although vlmcsd does neither require an activation key nor a payment to
  17. anyone, it is not meant to run illegal copies of Windows. Its purpose
  18. is to ensure that owners of legal copies can use their software without
  19. restrictions, e.g. if you buy a new computer or motherboard and your
  20. key will be refused activation from Microsoft servers due to hardware
  21. changes.
  22. vlmcsd may be started via an internet superserver like inetd(8) or
  23. xinetd(8) as well as an advanced init system like systemd(8) or
  24. launchd(8) using socket based activation. If vlmcsd detects that
  25. stdin(3) is a socket, it assumes that there is already a connected
  26. client on stdin that wants to be activated. All options that control
  27. setting up listening sockets will be ignored when in inetd mode.
  28. OPTIONS
  29. Since vlmcsd can be configured at compile time, some options may not be
  30. available on your system.
  31. All options that do no require an argument may be combined with a sin‐
  32. gle dash, for instance "vlmcsd -D -e" is identical to "vlmcsd -De". For
  33. all options that require an argument a space between the option and the
  34. option argument is optional. Thus "vlmcsd -r 2" and "vlmcsd -r2" are
  35. identical too.
  36. -h or -?
  37. Displays help.
  38. -V Displays extended version information. This includes the com‐
  39. piler used to build vlmcsd, the intended platform and flags
  40. (compile time options) to build vlmcsd. If you have the source
  41. code of vlmcsd, you can type make help (or gmake help on systems
  42. that do not use the GNU version of make(1) by default) to see
  43. the meaning of those flags.
  44. -L ipaddress[:port]
  45. Instructs vlmcsd to listen on ipaddress with optional port
  46. (default 1688). You can use this option more than once. If you
  47. do not specify -L at least once, IP addresses 0.0.0.0 (IPv4) and
  48. :: (IPv6) are used. If the IP address contains colons (IPv6) you
  49. must enclose the IP address in brackets if you specify the
  50. optional port, e.g. [2001:db8::dead:beef]:1688.
  51. If no port is specified, vlmcsd uses the default port according
  52. to a preceding -P option. If you specify a port, it can be a
  53. number (1-65535) or a name (usually found in /etc/services if
  54. not provided via LDAP, NIS+ or another name service).
  55. If you specify a link local IPv6 address (fe80::/10, usually
  56. starting with fe80::), it must be followed by a percent sign (%)
  57. and a scope id (=network interface name or number) on most
  58. unixoid OSses including Linux, Android, MacOS X and iOS, e.g.
  59. fe80::1234:56ff:fe78:9abc%eth0 or
  60. [fe80::1234:56ff:fe78:9abc%2]:1688. Windows (including cygwin)
  61. does not require a scope id unless the same link local address
  62. is used on more than one network interface. Windows does not
  63. accept a name and the scope id must be a number.
  64. -P port
  65. Use TCP port for all subsequent -L statements that do not
  66. include an optional port. If you use -P and -L, -P must be spec‐
  67. ified before -L.
  68. -F0 and -F1
  69. Allow (-F1) or disallow (-F0) binding to IP addresses that are
  70. currently not configured on your system. The default is -F0. -F1
  71. allows you to bind to an IP address that may be configured after
  72. you started vlmcsd. vlmcsd will listen on that address as soon
  73. as it becomes available. This feature is only available under
  74. Linux (IPv4 and IPv6) and FreeBSD (IPv4 only). FreeBSD allows
  75. this feature only for the root user (more correctly: processes
  76. that have the PRIV_NETINET_BINDANY privilege). Linux does not
  77. require a capability for this.
  78. -t seconds
  79. Timeout the TCP connection with the client after seconds sec‐
  80. onds. After sending an activation request. RPC keeps the TCP
  81. connection for a while. The default is 30 seconds. You may spec‐
  82. ify a shorter period to free ressources on your device faster.
  83. This is useful for devices with limited main memory or if you
  84. used -m to limit the concurrent clients that may request activa‐
  85. tion. Microsoft RPC clients disconnect after 30 seconds by
  86. default. Setting seconds to a greater value does not make much
  87. sense.
  88. -m concurrent-clients
  89. Limit the number of clients that will be handled concurrently.
  90. This is useful for devices with limited ressources or if you are
  91. experiencing DoS attacks that spawn thousands of threads or
  92. forked processes. If additional clients connect to vlmcsd, they
  93. need to wait until another client disconnects. If you set con‐
  94. current-clients to a small value ( <10 ), you should also select
  95. a reasonable timeout of 2 or 3 seconds with -t. The default is
  96. no limit.
  97. -d Disconnect each client after processing one activation request.
  98. This is a direct violation of DCE RPC but may help if you
  99. receive malicous fake RPC requests that block your threads or
  100. forked processes. Some other KMS emulators (e.g. py-kms) behave
  101. this way.
  102. -k Do not disconnect clients after processing an activation
  103. request. This selects the default behavior. -k is useful only if
  104. you used an ini file (see vlmcsd.ini(5) and -i). If the ini file
  105. contains the line "DisconnectClientsImmediately = true", you can
  106. use this switch to restore the default behavior.
  107. -N0 and -N1
  108. Disables (-N0) or enables (-N1) the use of the NDR64 transfer
  109. syntax in the RPC protocol. Unlike Microsoft vlmcsd supports
  110. NDR64 on 32-bit operating systems. Microsoft introduced NDR64 in
  111. Windows Vista but their KMS servers started using it with Win‐
  112. dows 8. Thus if you choose random ePIDs, vlmcsd will select
  113. ePIDs with build numbers 9200 and 9600 if you enable NDR64 and
  114. build numbers 6002 and 7601 if you disable NDR64. The default is
  115. to enable NDR64.
  116. -B0 and -B1
  117. Disables (-B0) or enables (-B1) bind time feature negotiation
  118. (BTFN) in the RPC protocol. All Windows operating systems start‐
  119. ing with Vista support BTFN and try to negotiate it when initi‐
  120. ating an RPC connection. Thus consider turning it off as a debug
  121. / troubleshooting feature only. Some older firewalls that selec‐
  122. tively block or redirect RPC traffic may get confused when they
  123. detect NDR64 or BTFN.
  124. -l filename
  125. Use filename as a log file. The log file records all activations
  126. with IP address, Windows workstation name (no reverse DNS
  127. lookup), activated product, KMS protocol, time and date. If you
  128. do not specify a log file, no log is created. For a live view of
  129. the log file type tail -f file.
  130. If you use the special filename "syslog", vlmcsd uses syslog(3)
  131. for logging. If your system has no syslog service (/dev/log)
  132. installed, logging output will go to /dev/console. Syslog log‐
  133. ging is not available in the native Windows version. The Cygwin
  134. version does support syslog logging.
  135. -D Normally vlmcsd daemonizes and runs in background (except the
  136. native Windows version). If -D is specified, vlmcsd does not
  137. daemonize and runs in foreground. This is useful for testing and
  138. allows you to simply press <Ctrl-C> to exit vlmcsd.
  139. The native Windows version never daemonizes and always behaves
  140. as if -D had been specified. You may want to install vlmcsd as a
  141. service instead. See -s.
  142. -e If specified, vlmcsd ignores -l and writes all logging output to
  143. stdout(3). This is mainly useful for testing and debugging and
  144. often combined with -D.
  145. -v Use verbose logging. Logs every parameter of the base request
  146. and the base response. It also logs the HWID of the KMS server
  147. if KMS protocol version 6 is used. This option is mainly for
  148. debugging purposes. It only has an effect if some form of log‐
  149. ging is used. Thus -v does not make sense if not used with -l,
  150. -e or -f.
  151. -q Do not use verbose logging. This is actually the default behav‐
  152. ior. It only makes sense if you use vlmcsd with an ini file (see
  153. -i and vlmcsd.ini(5)). If the ini file contains the line
  154. "LogVerbose = true" you can use -q to restore the default behav‐
  155. ior.
  156. -p filename
  157. Create pid file filename. This has nothing to do with KMS ePIDs.
  158. A pid file is a file where vlmcsd writes its own process id.
  159. This is used by standard init scripts (typically found in
  160. /etc/init.d). The default is not to write a pid file.
  161. -u user and -g group
  162. Causes vlmcsd to run in the specified user and group security
  163. context. The main purpose for this is to drop root privileges
  164. after it has been started from the root account. To use this
  165. feature from cygwin you must run cyglsa-config and the account
  166. from which vlmcsd is started must have the rights "Act as part
  167. of the operating system" and "Replace a process level token".
  168. The native Windows version does not support these options.
  169. The actual security context switch is performed after the TCP
  170. sockets have been created. This allows you to use privileged
  171. ports (< 1024) when you start vlmcsd from the root account.
  172. However if you use an ini, pid or log file, you must ensure that
  173. the unprivileged user has access to these files. You can always
  174. log to syslog(3) from an unprivileged account on most platforms
  175. (see -l).
  176. -w ePID
  177. Use ePID as Windows ePID. If specified, -r is disregarded for
  178. Windows.
  179. -0 ePID
  180. Use ePID as Office 2010 ePID (including Project and Visio). If
  181. specified, -r is disregarded for Office 2010.
  182. -3 ePID
  183. Use ePID as Office 2013/2016 ePID (including Project and Visio).
  184. If specified, -r is disregarded for Office 2013/2016.
  185. -H HwId
  186. Use HwId for all products. All HWIDs in the ini file (see -i)
  187. will not be used. In an ini file you can specify a seperate HWID
  188. for each application-guid. This is not possible when entering a
  189. HWID from the command line.
  190. HwId must be specified as 16 hex digits that are interpreted as
  191. a series of 8 bytes (big endian). Any character that is not a
  192. hex digit will be ignored. This is for better readability. The
  193. following commands are identical:
  194. vlmcsd -H 0123456789ABCDEF
  195. vlmcsd -H 01:23:45:67:89:ab:cd:ef
  196. vlmcsd -H "01 23 45 67 89 AB CD EF"
  197. -i filename
  198. Use configuration file (aka ini file) filename. Most configura‐
  199. tion parameters can be set either via the command line or an ini
  200. file. The command line always has precedence over configuration
  201. items in the ini file. See vlmcsd.ini(5) for the format of the
  202. configuration file.
  203. If vlmcsd has been compiled to use a default configuration file
  204. (often /etc/vlmcsd.ini), you may use -i- to ignore the default
  205. configuration file.
  206. -r0, -r1 (default) and -r2
  207. These options determine how ePIDs are generated if
  208. - you did not sprecify an ePID in the command line and
  209. - you haven't used -i or
  210. - the file specified by -i cannot be opened or
  211. - the file specified by -i does not contain the application-guid
  212. for the KMS request
  213. -r0 means there are no random ePIDs. vlmcsd simply issues
  214. default ePIDs that are built into the binary at compile time.
  215. Pro: behaves like real KMS server that also always issues the
  216. same ePID. Con: Microsoft may start blacklisting again and the
  217. default ePID may not work any longer.
  218. -r1 instructs vlmcsd to generate random ePIDs when the program
  219. starts or receives a SIGHUP signal and uses these ePIDs until it
  220. is stopped or receives another SIGHUP. Most other KMS emulators
  221. generate a new ePID on every KMS request. This is easily
  222. detectable. Microsoft could just modify sppsvc.exe in a way that
  223. it always sends two identical KMS requests in two RPC requests
  224. but over the same TCP connection. If both KMS responses contain
  225. the different ePIDs, the KMS server is not genuine. -r1 is the
  226. default mode. -r1 also ensures that all three ePIDs (Windows,
  227. Office 2010 and Office 2013) use the same OS build number and
  228. LCID (language id).
  229. If vlmcsd has been started by an internet superserver, -r1 works
  230. identically to -r2. This is simply due to the fact that vlmcsd
  231. is started upon a connection request and does not stay in memory
  232. after servicing a KMS request.
  233. -r2 behaves like most other KMS server emulators with random
  234. support and generates a new random ePID on every request. Use
  235. this mode with "care". However since Microsoft currently does
  236. not seem to do any verification of the ePID, you currently don't
  237. need to pay attention to ePIDs at all.
  238. -C LCID
  239. Do not randomize the locale id part of the ePID and use LCID
  240. instead. The LCID must be specified as a decimal number, e.g.
  241. 1049 for "Russian - Russia". This option has no effect if the
  242. ePID is not randomized at all, e.g. if it is selected from the
  243. command line or an ini file.
  244. By default vlmcsd generates a valid locale id that is recognized
  245. by .NET Framework 4.0. This may lead to a locale id which is
  246. unlikely to occur in your country, for instance 2155 for "Quecha
  247. - Ecuador". You may want to select the locale id of your country
  248. instead. See MSDN ⟨http://msdn.microsoft.com/en-us/goglobal/
  249. bb964664.aspx⟩ for a list of valid LCIDs. Please note that some
  250. of them are not recognized by .NET Framework 4.0.
  251. Most other KMS emulators use a fixed LCID of 1033 (English -
  252. US). To achive the same behavior in vlmcsd use -C 1033.
  253. -R renewal-interval
  254. Instructs clients to renew activation every renewal-interval.
  255. The renewal-interval is a number optionally immediately followed
  256. by a letter indicating the unit. Valid unit letters are s (sec‐
  257. onds), m (minutes), h (hours), d (days) and w (weeks). If you do
  258. not specify a letter, minutes is assumed.
  259. -R3d for instance instructs clients to renew activation every 3
  260. days. The default renewal-interval is 10080 (identical to 7d and
  261. 1w).
  262. Due to poor implementation of Microsofts KMS Client it cannot be
  263. guaranteed that activation is renewed on time as specfied by the
  264. -R option. Don't care about that. Renewal will happen well
  265. before your activation expires (usually 180 days).
  266. Even though you can specify seconds, the granularity of this
  267. option is 1 minute. Seconds are rounded down to the next multi‐
  268. ple of 60.
  269. -A activation-interval
  270. Instructs clients to retry activation every activation-interval
  271. if it was unsuccessful, e.g. because it could not reach the
  272. server. The default is 120 (identical to 2h). activation-inter‐
  273. val follows the same syntax as renewal-interval in the -R
  274. option.
  275. -s Installs vlmcsd as a Windows service. This option only works
  276. with the native Windows version and Cygwin. Combine -s with
  277. other command line options. These will be in effect when you
  278. start the service. The service automatically starts when you
  279. reboot your machine. To start it manually, type "net start vlm‐
  280. csd".
  281. If you use Cygwin, you must include your Cygwin system DLL
  282. directory (usually C:\Cygwin\bin or C:\Cygwin64\bin) into the
  283. PATH environment variable or the service will not start.
  284. You can reinstall the service anytime using vlmcsd -s again,
  285. e.g. with a different command line. If the service is running,
  286. it will be restarted with the new command line.
  287. When using -s the command line is checked for basic syntax
  288. errors only. For example "vlmcsd -s -L 1.2.3.4" reports no error
  289. but the service will not start if 1.2.3.4 is not an IP address
  290. on your system.
  291. -S Uninstalls the vlmcsd service. Works only with the native Win‐
  292. dows version and Cygwin. All other options will be ignored if
  293. you include -S in the command line.
  294. -U [domain\]username
  295. Can only be used together with -s. Starts the service as a dif‐
  296. ferent user than the local SYSTEM account. This is used to run
  297. the service under an account with low privileges. If you omit
  298. the domain, an account from the local computer will be used.
  299. You may use "NT AUTHORITY\NetworkService". This is a pseudo user
  300. with low privileges. You may also use "NT AUTHORITY\LocalSer‐
  301. vice" which has more privileges but these are of no use for run‐
  302. ning vlmcsd.
  303. Make sure that the user you specify has at least execute permis‐
  304. sion for your executable. "NT AUTHORITY\NetworkService" normally
  305. has no permission to run binaries from your home directory.
  306. For your convenience you can use the special username "/l" as a
  307. shortcut for "NT AUTHORITY\LocalService" and "/n" for "NT
  308. AUTHORITY\NetworkService". "vlmcsd -s -U /n" installs the ser‐
  309. vice to run as "NT AUTHORITY\NetworkService".
  310. -W password
  311. Can only be used together with -s. Specifies a password for the
  312. corresponding username you use with -U. SYSTEM, "NT AUTHOR‐
  313. ITY\NetworkService", "NT AUTHORITY\LocalService" do not require
  314. a password.
  315. If you specify a user with even lower privileges than "NT
  316. AUTHORITY\NetworkService", you must specify its password. You
  317. also have to grant the "Log on as a service" right to that user.
  318. SIGNALS
  319. The following signals differ from the default behavior:
  320. SIGTERM, SIGINT
  321. These signals cause vlmcsd to exit gracefully. All global sema‐
  322. phores and shared memory pages will be released, the pid file
  323. will be unlinked (deleted) and a shutdown message will be
  324. logged.
  325. SIGHUP Causes vlmcsd to be restarted completely. This is useful if you
  326. started vlmcsd with an ini file. You can modify the ini file
  327. while vlmcsd is running and then sending SIGHUP, e.g. by typing
  328. "killall -SIGHUP vlmcsd" or "kill -SIGHUP `cat /var/run/vlm‐
  329. csd.pid`".
  330. The SIGHUP handler has been implemented relatively simple. It is
  331. virtually the same as stopping vlmcsd and starting it again
  332. immediately with the following exceptions:
  333. — The new process does not get a new process id.
  334. — If you used a pid file, it is not deleted and recreated
  335. because the process id stays the same.
  336. — If you used the 'user' and/or 'group' directive in an ini
  337. file these are ignored. This is because once you switched to
  338. lower privileged users and groups, there is no way back. Any‐
  339. thing else would be a severe security flaw in the OS.
  340. Signaling is not available in the native Windows version and in the
  341. Cygwin version when it runs as Windows service.
  342. SUPPORTED OPERATING SYSTEMS
  343. vlmcsd compiles and runs on Linux, Windows (no Cygwin required but
  344. explicitly supported), Mac OS X, FreeBSD, NetBSD, OpenBSD, Dragonfly
  345. BSD, Minix, Solaris, OpenIndiana, Android and iOS. Other POSIX or
  346. unixoid OSses may work with unmodified sources or may require minor
  347. porting efforts.
  348. SUPPORTED PRODUCTS
  349. vlmcsd can answer activation requests for the following products: Win‐
  350. dows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows
  351. Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows
  352. Server 2012 R2, Office 2010, Project 2010, Visio 2010, Office 2013,
  353. Project 2013, Visio 2013, Office 2016, Project 2016, Visio 2016.
  354. Office, Project and Visio must be volume license versions.
  355. FILES
  356. vlmcsd.ini(5)
  357. EXAMPLES
  358. vlmcsd -f
  359. Starts vlmcsd in foreground. Useful if you use it for the first
  360. time and want to see what's happening when a client requests
  361. activation.
  362. vlmcsd -l /var/log/vlmcsd.log
  363. Starts vlmcsd as a daemon and logs everything to /var/log/vlm‐
  364. csd.log.
  365. vlmcsd -L 192.168.1.17
  366. Starts vlmcsd as a daemon and listens on IP address 192.168.1.17
  367. only. This is useful for routers that have a public and a pri‐
  368. vate IP address to prevent your KMS server from becoming public.
  369. vlmcsd -s -U /n -l C:\logs\vlmcsd.log
  370. Installs vlmcsd as a Windows service with low privileges and
  371. logs everything to C:\logs\vlmcsd.log when the service is
  372. started with "net start vlmcsd".
  373. BUGS
  374. An ePID specified in an ini file must not contain spaces.
  375. The maximum number of -L options in the command line or listen state‐
  376. ments in the inifile is the platform default for FD_SETSIZE. This is 64
  377. on Windows and 1024 on most Unixes.
  378. AUTHOR
  379. Written by crony12, Hotbird64 and vityan666. With contributions from
  380. DougQaid.
  381. CREDITS
  382. Thanks to CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad, Rati‐
  383. borus, ...
  384. SEE ALSO
  385. vlmcsd.ini(5), vlmcsd(7), vlmcs(1), vlmcsdmulti(1)
  386. Hotbird64 June 2016 VLMCSD(8)