Updating

Updating is very simple and straight forward.

You should always have a backup client opped in all of your channels just in case the upgrade goes bad.

This guide assumes that you are using pre-compiled binaries. If you are compiling yourself and uploading the binaries, you are on your own; you still need to name the binary correctly in the scheme shown in the example.

Binary preparations

  • See also GettingStarted
  • The PackConfig syntax may have changed, please review PackConfig and update yours if necesary.
  • Download the latest source code and Compile or simply download pre-compiled binaries for each operating system you plan to use. (Linux/FreeBSD)
  • ================================== REQUIRED ===================================
  • ================================== REQUIRED ===================================
  • ================================== REQUIRED ===================================
  • Initialize each binary with your PackConfig file. (You can only initialize binaries on the same system they are for. You may need to do some uploading/downloading here between shells to initialize all needed binaries)
    1. ./wraith -Q
      • Paste in pack config
  • ================================== REQUIRED ===================================
  • ================================== REQUIRED ===================================
  • ================================== REQUIRED ===================================

Updating

  • If updating from a version before 1.2.16: Kill off and remove crontab of all althubs. After all leaf bots are updated, you can start the althubs back up and let them update as well.
  • Pick a hub that should distribute the binaries to the botnet. (high bandwidth allowed)

Shell operations for hub

  1. Login to the shell for the hub and cd into the hub's directory.
  2. cd hub
  3. mkdir bins/ (only needed if not already there)
  4. cd bins/
  5. wget or upload all of your tar.gz packages that you created above to this directory.
  6. Untar/unzip the packages if needed: tar -zxf package.tar.gz
  7. Remove leftover temp files: rm -f *.tar.gz
  8. Also copy a binary to ../newhub, ie cp wraith.Linux-1.3.0 ../newhub
    • This does NOT mean to overwrite your current hub's binary. Follow on for further instructions.
  • Nothing else should be done. Do not rename your hub or recreate it. Stop here and move on to the next section.

Example directory structure

Your hub directory should look *something* like this:

$ ls -al
total 1384
drwx------   5 bryan  bryan      512 May 22 23:37 ./
drwx-----x  17 bryan  bryan     1024 May 19 03:52 ../
drwx------   2 bryan  bryan      512 May 22 00:00 .../
-rwx------   1 bryan  bryan   193504 May 22 23:21 .u*
drwxr-xr-x   2 bryan  bryan      512 May 19 03:51 bins/
-rwx------   1 bryan  bryan  1187724 May 19 03:51 hub*
-rwx------   1 bryan  bryan  1187724 May 19 03:51 newhub*
drwx------   2 bryan  bryan      512 May 22 23:37 tmp/
$ ls -al bins/
total 2628
drwxr-xr-x  2 bryan  bryan      512 May 19 03:51 ./
drwx------  5 bryan  bryan      512 May 22 23:37 ../
-rwx------  1 bryan  bryan  1187724 May 19 03:48 wraith.FreeBSD-v1.3.0*
-rwx------  1 bryan  bryan  1447696 May 19 03:49 wraith.Linux-v1.3.0*

If it doesn't look like this, start over again. Extra .tar.gz files or old binaries can be ignored, but are not necessary. Just don't touch the current hub binary.

Botnet operations on hub

  1. Enable cleartext linking in case the encryption algorithm has changed. (If you are running 1.2.15 or lower, run this after the .update cmd instead)
    .set link_cleartext 1
    
  2. Disable cookies for all channels.
    .chanset * +fastop
    
  3. Update the hub itself with newhub, created above.
    .update newhub
    
  4. The hub will now restart; Telnet back in.
  5. Tell the hub to start sharing out the new binaries
    .chattr THEHUB +u
    
  6. Grab a beer, some guacamole and chips [required]
  7. Check status of update with .netver
  8. Once the entire update is done be sure to disable the cleartext botlink
    .set link_cleartext 0
    
  9. Re-enable cookies for selected channels.
    .chanset * -fastop
    

Notes on updating

  • One bot/shell is sent the binary at a time.
  • The first bot listed in each binary will download the new binary, and then will restart its child bots.
  • After a few minutes, that bot will restart itself.
  • Bots upgrade while remaining on IRC and keeping the same shell PID/uptime.

Poll(Was this article helpful?; Yes; No)?

TagIt(updating)?

Last modified 7 years ago Last modified on Aug 14, 2010, 8:50:38 PM