
<PAGE>

                                                                    Exhibit 10.6

                        INDEMNITY, SUBROGATION and CONTRIBUTION AGREEMENT dated
                  as of June 23, 1999, among ANTEON CORPORATION, a Virginia
                  corporation (the "BORROWER"), each Subsidiary of the Borrower
                  listed on Schedule I hereto (the "GUARANTORS") and MELLON
                  BANK, N.A., a national banking association, ("MELLON"), as
                  collateral agent (in such capacity, the "COLLATERAL AGENT")
                  for the Secured Parties (as defined in the Credit Agreement
                  referred to below).

      Reference is made to (a) the Credit Agreement dated as of June 23, 1999
(as amended, supplemented or otherwise modified from time to time, the "CREDIT
AGREEMENT"), among the Borrower, the lenders from time to time party thereto
(the "LENDERS"), Credit Suisse First Boston, as administrative agent for the
Lenders (in such capacity, the "ADMINISTRATIVE AGENT"), and as issuing bank,
Mellon, as Collateral Agent, swingline lender and syndication agent, and
Deutsche Bank A.G., as documentation agent, and (b) the Subsidiary Guarantee
Agreement dated as of June 23, 1999, among the Guarantors and the Collateral
Agent (the "GUARANTEE AGREEMENT"). Capitalized terms used herein and not defined
herein shall have the meanings assigned to such terms in the Credit Agreement.

      The Lenders have agreed to make Loans to the Borrower, and the Issuing
Bank has agreed to issue Letters of Credit for the account of the Borrower,
pursuant to, and upon the terms and subject to the conditions specified in, the
Credit Agreement. The Guarantors have guaranteed such Loans and the other
Obligations (as defined in the Guarantee Agreement) of the Borrower under the
Credit Agreement pursuant to the Guarantee Agreement and certain Guarantors have
granted Liens on and security interests in certain of their assets to secure
such guarantees. The obligations of the Lenders to make Loans and of the Issuing
Bank to issue Letters of Credit are conditioned upon, among other things, the
execution and delivery by the Borrower and the Guarantors of an agreement in the
form hereof.

      Accordingly, the Borrower, each Guarantor and the Collateral Agent agree
as follows:

      SECTION 1. INDEMNITY AND SUBROGATION. In addition to all such rights of
indemnity and subrogation as the Guarantors may have under applicable law (but
subject to Section 3), the Borrower agrees that (a) in the event a payment shall
be made by any Guarantor under the Guarantee Agreement, the Borrower shall
indemnify such Guarantor for the full amount of such payment and such Guarantor
shall be subrogated to the rights of the person to whom such payment shall have
been made to the extent of such payment and (b) in the event any assets of any
Guarantor shall be sold pursuant to any Security Document to satisfy a claim of
any Secured Party, the Borrower shall indemnify such Guarantor in an amount
equal to the greater of the book value or the fair market value of the assets so
sold.

      SECTION 2. CONTRIBUTION AND SUBROGATION. Each Guarantor (a "CONTRIBUTING
GUARANTOR") agrees (subject to Section 3) that, in the event a payment shall be
made by any other Guarantor under the Guarantee Agreement or assets of any other
Guarantor shall be sold pursuant to any Security Document to satisfy a claim of
any Secured Party and such other Guarantor (the "CLAIMING GUARANTOR") shall not
have been fully indemnified by the Borrower as provided in Section 1, the
Contributing Guarantor shall indemnify the Claiming Guarantor in an amount equal
to the amount of such payment or the greater of the book value
<PAGE>

                                                                               2


or the fair market value of such assets, as the case may be, in each case
multiplied by a fraction of which the numerator shall be the net worth of the
Contributing Guarantor on the date hereof and the denominator shall be the
aggregate net worth of all the Guarantors on the date hereof (or, in the case of
any Guarantor becoming a party hereto pursuant to Section 12, the date of the
Supplement hereto executed and delivered by such Guarantor). Any Contributing
Guarantor making any payment to a Claiming Guarantor pursuant to this Section 2
shall be subrogated to the rights of such Claiming Guarantor under Section 1 to
the extent of such payment.

      SECTION 3. SUBORDINATION. Notwithstanding any provision of this Agreement
to the contrary, all rights of the Guarantors under Sections 1 and 2 and all
other rights of indemnity, contribution or subrogation under applicable law or
otherwise shall be fully subordinated to the indefeasible payment in full in
cash of the Obligations. No failure on the part of the Borrower or any Guarantor
to make the payments required by Sections 1 and 2 (or any other payments
required under applicable law or otherwise) shall in any respect limit the
obligations and liabilities of any Guarantor with respect to its obligations
hereunder, and each Guarantor shall remain liable for the full amount of the
obligations of such Guarantor hereunder.

      SECTION 4. TERMINATION. This Agreement shall survive and be in full force
and effect so long as any Obligation is outstanding and has not been
indefeasibly paid in full in cash, and so long as the L/C Exposure has not been
reduced to zero or any of the Commit ments under the Credit Agreement have not
been terminated, and shall continue to be effective or be reinstated, as the
case may be, if at any time payment, or any part thereof, of any Obligation is
rescinded or must otherwise be restored by any Secured Party or any Guarantor
upon the bankruptcy or reorganization of the Borrower, any Guarantor or other
wise.

      SECTION 5. GOVERNING LAW. THIS AGREEMENT SHALL BE GOVERNED BY, AND
CONSTRUED IN ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK.

      SECTION 6. NO WAIVER; AMENDMENT. (a) No failure on the part of the
Collateral Agent or any Guarantor to exercise, and no delay in exercising, any
right, power or remedy hereunder shall operate as a waiver thereof, nor shall
any single or partial exercise of any such right, power or remedy by the
Collateral Agent or any Guarantor preclude any other or further exercise thereof
or the exercise of any other right, power or remedy. All remedies hereunder are
cumulative and are not exclusive of any other remedies provided by law. None of
the Collateral Agent and the Guarantors shall be deemed to have waived any
rights here under unless such waiver shall be in writing and signed by such
parties.

      (b) Neither this Agreement nor any provision hereof may be waived, amended
or modified except pursuant to a written agreement entered into between the
Borrower, the Guarantors and the Collateral Agent, with the prior written
consent of the Required Lenders (except as otherwise provided in the Credit
Agreement).

      SECTION 7. NOTICES. All communications and notices hereunder shall be in
writing and given as provided in the Guarantee Agreement and addressed as
specified therein.
<PAGE>

                                                                               3


      SECTION 8. BINDING AGREEMENT; ASSIGNMENTS. Whenever in this Agreement any
of the parties hereto is referred to, such reference shall be deemed to include
the successors and assigns of such party; and all covenants, promises and
agreements by or on behalf of the parties that are contained in this Agreement
shall bind and inure to the benefit of their respective successors and assigns.
Neither the Borrower nor any Guarantor may assign or transfer any of its rights
or obligations hereunder (and any such attempted assignment or transfer shall be
void) without the prior written consent of the Required Lenders. Notwithstanding
the foregoing, at the time any Guarantor is released from its obligations under
the Guarantee Agreement in accordance with such Guarantee Agreement and the
Credit Agreement, such Guarantor will cease to have any rights or obligations
under this Agreement.

      SECTION 9. SURVIVAL OF AGREEMENT; SEVERABILITY. (a) All covenants and
agreements made by the Borrower and each Guarantor herein and in the
certificates or other instruments prepared or delivered in connection with this
Agreement or the other Loan Documents shall be considered to have been relied
upon by the Collateral Agent, the other Secured Parties and each Guarantor and
shall survive the making by the Lenders of the Loans and the issuance of the
Letters of Credit by the Issuing Bank, and shall continue in full force and
effect as long as the principal of or any accrued interest on any Loans or any
other fee or amount payable under the Credit Agreement or this Agreement or
under any of the other Loan Documents is outstanding and unpaid or the L/C
Exposure does not equal zero and as long as the Commitments have not been
terminated.

      (b) In case any one or more of the provisions contained in this Agreement
should be held invalid, illegal or unenforceable in any respect, no party hereto
shall be required to comply with such provision for so long as such provision is
held to be invalid, illegal or unenforceable, but the validity, legality and
enforceability of the remaining provisions contained herein shall not in any way
be affected or impaired thereby. The parties shall endeavor in good-faith
negotiations to replace the invalid, illegal or unenforceable provisions with
valid provisions the economic effect of which comes as close as possible to that
of the invalid, illegal or unenforceable provisions.

      SECTION 10. COUNTERPARTS. This Agreement may be executed in counterparts
(and by different parties hereto on different counterparts), each of which shall
constitute an original, but all of which when taken together shall constitute a
single contract. This Agree ment shall be effective with respect to any
Guarantor when a counterpart bearing the signature of such Guarantor shall have
been delivered to the Collateral Agent. Delivery of an executed signature page
to this Agreement by fax transmission shall be as effective as delivery of a
manually signed counterpart of this Agreement.

      SECTION 11. RULES OF INTERPRETATION. The rules of interpretation specified
in Section 1.02 of the Credit Agreement shall be applicable to this Agreement.

      SECTION 12. ADDITIONAL GUARANTORS. Pursuant to Section 5.12 of the Credit
Agreement, each Domestic Subsidiary of the Borrower (other than any Inactive
Subsidiary) that was not in existence or not such a Subsidiary on the date of
the Credit Agreement is required to enter into the Guarantee Agreement as a
Guarantor upon becoming such a Subsidiary (or ceasing to be an Inactive
Subsidiary). Upon execution and delivery, after the date hereof, by the
Collateral Agent and such a Subsidiary of an instrument in the form of Annex 1
hereto, such Subsidiary shall become a Guarantor hereunder with the same force
<PAGE>

                                                                               4


and effect as if originally named as a Guarantor hereunder. The execution and
delivery of any instrument adding an additional Guarantor as a party to this
Agreement shall not require the consent of any Guarantor hereunder. The rights
and obligations of each Guarantor hereunder shall remain in full force and
effect notwithstanding the addition of any new Guarantor as a party to this
Agreement.
<PAGE>

                                                                               5


      IN WITNESS WHEREOF, the parties hereto have caused this Agreement to be
executed by their duly authorized officers as of the date first appearing above.


                                    ANTEON CORPORATION,


                                    by:
                                       -----------------------
                                       Name:
                                       Title:


                                    ANALYSIS & TECHNOLOGY, INC.,


                                    by:
                                       -----------------------
                                       Name:
                                       Title:


                                    INTERACTIVE MEDIA CORP.,


                                    by:
                                       -----------------------
                                       Name:
                                       Title:


                                    TECHMATICS, INC.,


                                    by:
                                       -----------------------
                                       Name:
                                       Title:


                                    VECTOR DATA SYSTEMS, INC.,


                                    by:
                                       -----------------------
                                       Name:
                                       Title:
<PAGE>

                                    MELLON BANK, N.A., as Collateral
                                    Agent,


                                    by:
                                       -----------------------
                                       Name:
                                       Title:
<PAGE>

                                                                      SCHEDULE I
                                                    to the Indemnity Subrogation
                                                      and Contribution Agreement

                                   GUARANTORS

Name
----

Analysis & Technology, Inc.

Interactive Media Corp.

Techmatics, Inc.

Vector Data Systems, Inc.
<PAGE>

                                                                      Annex 1 to
                                                  the Indemnity, Subrogation and
                                                          Contribution Agreement

                        SUPPLEMENT NO.   dated as of [  ], to the Indemnity,
                  Subrogation and Contribution Agreement dated as of June 23,
                  1999 (as the same may be amended, supplemented or otherwise
                  modified from time to time, the "INDEMNITY, SUBROGATION AND
                  CONTRIBUTION AGREEMENT"), among ANTEON CORPORATION, a Virginia
                  corporation (the "BORROWER") each Subsidiary of the Borrower
                  listed on Schedule I thereto (the "GUARANTORS"), and MELLON
                  BANK, N.A., an national banking association, ("MELLON"), as
                  collateral agent (the "COLLATERAL AGENT") for the Secured
                  Parties (as defined in the Credit Agreement referred to
                  below).

      A. Reference is made to (a) the Credit Agreement dated as of June 23, 1999
(as amended, supplemented or otherwise modified from time to time, the "CREDIT
AGREEMENT"), among the Borrower, the lenders from time to time party thereto
(the "LENDERS"), Credit Suisse First Boston, as administrative agent for the
Lenders (in such capacity, the "ADMINISTRATIVE AGENT"), and as issuing bank,
Mellon, as Collateral Agent, swingline lender and syndication agent, and
Deutsche Bank A.G., as documentation agent, and (b) the Subsidiary Guarantee
Agreement dated as of June 23, 1999, among the Guarantors and the Collateral
Agent (the "GUARANTEE AGREEMENT").

      B. Capitalized terms used herein and not otherwise defined herein shall
have the meanings assigned to such terms in the Indemnity, Subrogation and
Contribution Agreement and the Credit Agreement.

      C. The Borrower and the Guarantors have entered into the Indemnity,
Subrogation and Contribution Agreement in order to induce the Lenders to make
Loans and the Issuing Bank to issue Letters of Credit. Pursuant to Section 5.12
of the Credit Agreement, each Domestic Subsidiary of the Borrower (other than
any Inactive Subsidiary) that was not in existence or not such a Subsidiary on
the date of the Credit Agreement is required to enter into the Guarantee
Agreement as a Guarantor upon becoming a Domestic Subsidiary (or ceasing to be
an Inactive Subsidiary). Section 12 of the Indemnity, Subrogation and
Contribution Agreement provides that additional Subsidiaries of the Borrower may
become Guarantors under the Indemnity, Subrogation and Contribution Agreement by
execution and delivery of an instrument in the form of this Supplement. The
undersigned Subsidiary of the Borrower (the "NEW GUARANTOR") is executing this
Supplement in accordance with the requirements of the Credit Agreement to become
a Guarantor under the Indemnity, Subrogation and Contribution Agreement in order
to induce the Lenders to make additional Loans and the Issuing Bank to issue
additional Letters of Credit and as consideration for Loans previously made and
Letters of Credit previously issued.

      Accordingly, the Collateral Agent and the New Guarantor agree as follows:

      SECTION 1. In accordance with Section 12 of the Indemnity, Subrogation and
Contribution Agreement, the New Guarantor by its signature below becomes a
Guarantor under the Indemnity, Subrogation and Contribution Agreement with the
same force and effect as if originally named therein as a Guarantor and the New
Guarantor hereby agrees to all the terms and provisions of the Indemnity,
Subrogation and Contribution Agreement applicable to it as a Guarantor
thereunder. Each reference to a "Guarantor" in the Indemnity, Subrogation and
Contribution Agreement shall be deemed to include the New Guarantor. The
Indemnity, Subrogation and Contribution Agreement is hereby incorporated herein
by reference.
<PAGE>

                                                                               2


      SECTION 2. The New Guarantor represents and warrants to the Collateral
Agent and the other Secured Parties that this Supplement has been duly
authorized, executed and delivered by it and constitutes its legal, valid and
binding obligation, enforceable against it in accordance with its terms.

      SECTION 3. This Supplement may be executed in counterparts (and by
different parties hereto on different counterparts), each of which shall
constitute an original, but all of which when taken together shall constitute a
single contract. This Supplement shall become effective when the Collateral
Agent shall have received counterparts of this Supplement that, when taken
together, bear the signatures of the New Guarantor and the Collateral Agent.
Delivery of an executed signature page to this Supplement by fax transmission
shall be as effective as delivery of a manually signed counterpart of this
Supplement.

      SECTION 4. Except as expressly supplemented hereby, the Indemnity,
Subrogation and Contribution Agreement shall remain in full force and effect.

      SECTION 5. THIS SUPPLEMENT SHALL BE GOVERNED BY, AND CONSTRUED IN
ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK.

      SECTION 6. In case any one or more of the provisions contained in this
Supplement should be held invalid, illegal or unenforceable in any respect,
neither party hereto shall be required to comply with such provision for so long
as such provision is held to be invalid, illegal or unenforceable, but the
validity, legality and enforceability of the remaining provisions contained
herein and in the Indemnity, Subrogation and Contribution Agreement shall not in
any way be affected or impaired. The parties hereto shall endeavor in good-faith
negotiations to replace the invalid, illegal or unenforceable provisions with
valid provisions the economic effect of which comes as close as possible to that
of the invalid, illegal or unenforceable provisions.

      SECTION 7. All communications and notices hereunder shall be in writing
and given as provided in Section 7 of the Indemnity, Subrogation and
Contribution Agreement. All communications and notices hereunder to the New
Guarantor shall be given to it at the address set forth under its signature.

      SECTION 8. The New Guarantor agrees to reimburse the Collateral Agent for
its reasonable out-of-pocket expenses in connection with this Supplement,
including the reasonable fees, other charges and disbursements of counsel for
the Collateral Agent.
<PAGE>

                                                                               3


      IN WITNESS WHEREOF, the New Guarantor and the Collateral Agent have duly
executed this Supplement to the Indemnity, Subrogation and Contribution
Agreement as of the day and year first above written.


                                    [Name Of New Guarantor],


                                    by:
                                       --------------------------
                                       Name:
                                       Title:
                                       Address:

                                    MELLON BANK, N.A., as Collateral Agent,


                                    by:
                                       --------------------------
                                       Name:
                                       Title:
<PAGE>

                                                                      SCHEDULE I
                                           to Supplement No.___ to the Indemnity
                                          Subrogation and Contribution Agreement

                                   GUARANTORS

Name
----
