EXHIBIT 5 Testa, Hurwitz & Thibeault, LLP 125 High Street Boston, MA 02110 November 15, 1999 NetScout Systems, Inc. 4 Technology Park Drive Westford, MA 01886 Re: REGISTRATION STATEMENT ON FORM S-8 Ladies and Gentlemen: We are acting as counsel for NetScout Systems, Inc., a Delaware corporation (the "COMPANY"), in connection with the registration on a Registration Statement on Form S-8 (the "REGISTRATION STATEMENT") under the Securities Act of 1933, as amended, of the offer and sale of up to 4,500,000 shares (the "SHARES") of Common Stock, par value $.001 per share, of the Company under the 1999 Stock Option and Incentive Plan (the "1999 PLAN"). In rendering our opinion, we have examined, and are familiar with, and have relied as to factual matters solely upon, originals or copies certified, or otherwise identified to our satisfaction, of such documents, corporate records or other instruments as we have deemed necessary or appropriate for the purposes of the opinion set forth herein, including, without limitation, (a) the 1999 Plan, (b) the Company's Third Amended and Restated Certificate of Incorporation, (c) the Company's Amended and Restated By-laws, (d) a specimen of the form of Certificate evidencing the Shares and (e) the minute books of the Company. Based upon and subject to the foregoing, we are of the opinion that the Shares are duly authorized and, when issued and delivered pursuant to the terms of the 1999 Plan and the terms of any agreement relating to any of the options granted thereunder, will be validly issued, fully paid and nonassessable. We hereby consent to the filing of this opinion as Exhibit 5 to the Registration Statement. Very truly yours, /s/ Testa, Hurwitz & Thibeault, LLP TESTA, HURWITZ & THIBEAULT, LLP