<PAGE>   1
                                                                    EXHIBIT 10.6

                                    AGREEMENT

This Agreement ("Agreement"), effective as of January 17, 2001, is entered into
by and between CyberGuard Corporation, a Florida corporation with principal
place of business at 2000 W. Commercial Blvd., Suite 200, Fort Lauderdale, FL
33309 ("CyberGuard" or "Company"), and Scott J. Hammack, an individual residing
at Lake Bluff, IL ("Mr. Hammack").

WHEREAS, CyberGuard and Mr. Hammack entered into that certain Agreement
effective as of December 26, 2000 ("First Agreement") which provided, among
other things, that Mr. Hammack would participate in a financing transaction
effected by the Company as the next financing transaction after the date of the
First Agreement ("Next Financing Transaction") and that Mr. Hammack would
participate in the Next Financing Transaction by making an additional aggregate
investment of $250,000.00 on the same terms and conditions as the other
investors therein; and

WHEREAS, CyberGuard and Mr. Hammack agree that Mr. Hammack's investment under
this Agreement represents the contemplated investment in the Next Financing
Transaction of CyberGuard.

NOW THEREFORE, CyberGuard and Mr. Hammack agree as follows:

     D.  The recitals set forth above are true and correct.

     E.  Mr. Hammack shall pay to CyberGuard two hundred fifty thousand U.S.
Dollars (U.S. $250,000.00) in cash by no later than January 26, 2001.

     F.  In exchange for the above payment and subject to the terms of this
Agreement, CyberGuard shall issue to Mr. Hammack 62,500 shares of Common Stock
of CyberGuard at the price of $4.00 per share (the "Securities").

     G.  In connection with the purchase of the Securities, Mr. Hammack
represents to the Company, and understands and agrees that:

         8.       He is acquiring all of the Securities for his own account for
         investment and not with a view to, with the present intention of, or in
         connection with, any resale or distribution of the Securities or any
         interest therein.

         9.       He has carefully considered and has, to the extent he believes
         such discussion to be necessary, discussed with professional legal, tax
         and financial advisors the suitability of an investment in the
         Securities, and Mr. Hammack has determined that the Securities are a
         suitable investment for him.


                                       1
<PAGE>   2

         10.      He is an accredited investor as such term is defined in
         Regulation D under the Securities Act of 1933, as amended (the "Act"),
         and has sufficient knowledge and experience in financial and business
         matters to evaluate the merits and risks of this investment.

         11.      He has been afforded full access to all of the publicly
         available filings and financial information filed by the Company with
         the U.S. Securities and Exchange Commission and the opportunity to ask
         questions of representatives of the Company and obtain answers to any
         questions he may have had with respect to the Company.

         12.      The Securities have not been registered under the Act or under
         the laws of any jurisdiction, and, except as otherwise specifically
         provided in Appendix A to this Agreement, the Company is under no
         obligation to so register the Securities under the Act or under the
         laws of any jurisdiction. The Mr. Hammack also understands that he must
         hold the Securities indefinitely unless they are subsequently
         registered under the Act or an exemption from such registration is then
         available.

         13.      Mr. Hammack agrees not to sell, transfer, assign, hypothecate,
         pledge or otherwise dispose of the Securities unless (a) such
         transaction has been registered under the Act and applicable state
         securities and other laws, or (b) in the opinion of counsel for the
         Company the proposed sale, transfer, assignment, encumbrance or other
         disposition will not result in the violation of the registration
         provisions of the Act or any other applicable federal, state or other
         securities laws, rules and regulations.

         14.      The Securities will bear the following legend:

                  THESE SECURITIES HAVE NOT BEEN REGISTERED UNDER
                  THE SECURITIES ACT OF 1933, AS AMENDED ("THE
                  SECURITIES ACT"), OR ANY STATE SECURITIES LAW.
                  THEY MAY NOT BE OFFERED OR TRANSFERRED UNLESS
                  (I) A REGISTRATION STATEMENT FOR THE SALE OF
                  THE SECURITIES HAS BEEN FILED UNDER THE
                  SECURITIES ACT AND APPLICABLE STATE SECURITIES
                  LAWS AND IS EFFECTIVE OR (II) THE COMPANY HAS
                  RECEIVED AN OPINION OF COUNSEL, WHICH OPINION
                  IS SATISFACTORY TO THE COMPANY, TO THE EFFECT
                  THAT SUCH REGISTRATION IS NOT REQUIRED UNDER
                  THE SECURITIES ACT OR STATE SECURITIES LAWS.

         E.       Mr. Hammack shall be entitled to the registration rights
described in Appendix A hereto.


                                       2
<PAGE>   3

         F.       The Securities to be issued by the Company to Mr. Hammack
hereunder shall be subject to anti-dilusion rights in the event that shares of
the Company stock are issued in settlement of any lawsuit pending against the
Company.

         G.       If any action at law or in equity is necessary to enforce or
interpret the terms of this Agreement the prevailing party shall be entitled to
reasonable attorneys' fees, costs and expenses in addition to any other relief
to which it may be entitled.

         H.       This Agreement may not be assigned by either party without the
prior written consent of the non-assigning party; provided, however, that
CyberGuard may assign this Agreement to any assignee, transferee, "spin off" or
successor in interest of substantially all of the assets of the Company.

         I.       Except for the parties to this Agreement and their respective
successors and assigns, no third party beneficiaries are intended by this
Agreement.

         J.       This Agreement shall be governed by and construed in
accordance with the substantive laws of the State of Florida.

         K.       Any action or proceeding arising under or relating to this
Agreement shall be brought exclusively in the federal or state courts sitting in
Broward County, Florida and the parties hereto submit to the jurisdiction of the
state and federal courts in the State of Florida and agree that the venue of any
such action or proceeding shall be laid in Broward County, Florida.

         L.       The failure of any party hereto at any time to require strict
performance of any condition, promise, agreement or understanding set forth
herein shall not be construed as a waiver or relinquishment of the right to
require strict performance of the same condition, promise, agreement or
understanding at a subsequent time.

         M.       This Agreement and its Exhibits and Appendices constitute the
entire agreement between the parties with respect to the subject matter hereof
and may not be modified or amended except in writing, signed by each party.

IN WITNESS WHEREOF, the above Agreement was executed by both parties hereto
effective as of January 17, 2001.

CYBERGUARD CORPORTION                        SCOTT J. HAMMACK



By:
   ---------------------------               ---------------------------
Title:
      ------------------------


                                       3
<PAGE>   4

                                   APPENDIX A

                               REGISTRATION RIGHTS

         1.       The Company agrees that if, at any time following the date of
this Agreement and while the provisions of this Appendix remain in effect, the
Board of Directors of the Company shall authorize the filing of a registration
statement on Form S-1 or Form S-3 (any such registration statement being
hereinafter called a "Registration Statement") under the Act in connection with
a proposed underwritten public offering of Company Common Stock effected on
behalf of the Company solely for cash, the Company will promptly notify Mr.
Hammack that such Registration Statement will be filed and that the Securities
that are then held by Mr. Hammack (the "Hammack Shares"), will, at Mr. Hammack's
request, be included in such Registration Statement, and (ii) upon the written
request of Mr. Hammack within 15 days after the giving of such notice by the
Company, include in the securities covered by such Registration Statement all
Hammack Shares which it has been so requested to include.

         2.       The Company shall pay all expenses incurred in connection with
any Registration Statement, other than underwriting discounts or fees,
applicable transfer taxes relating to Hammack Shares and the fees and expenses
of counsel for Mr. Hammack.

         3.       The Company shall not be required to include in such
registration any Hammack Shares held by Mr. Hammack unless Mr. Hammack agrees to
the terms of the underwriting agreement between the Company and the managing
underwriter of such offering, which agreement may require that any shares of
Company capital stock owned by Mr. Hammack be withheld from the market by Mr.
Hammack for a period of time after the effective date of the registration
statement by which such public offering is being effected. Furthermore, the
Company shall be obligated to include in such registration only the quantity of
Hammack Shares, if any, as will not, in the opinion of the managing underwriter,
jeopardize the success of the offering by the Company. If the managing
underwriter for the offering advises the Company in writing that the total
amount of securities sought to be registered by Mr. Hammack and other
shareholders of the Company having similar registration rights as of the date
thereof (collectively, the "Company Shareholders") exceeds the amount of
securities that can be offered without adversely affecting the offering by the
Company, then the Company may reduce the number of shares to be registered by
Company for the Company Shareholders, including the Hammack Shares requested to
be included therein, to a number satisfactory to such managing underwriter,
which number may be zero. Any such reduction shall be pro rata, based upon the
percentage that the shares requested to be included in the Registration
Statement by each Company Shareholder constitutes of the total number of shares
requested to be included therein on behalf of the Company Shareholders.

         4.       The Company shall not be obligated to register any Hammack
Shares pursuant to this Appendix A at any time when the resale provisions of
Rule 144 promulgated under the Securities Act are available to Mr. Hammack for
the sale of the Hammack Shares.


                                       4