Exhibit 23.1 CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTANTING FIRM We hereby consent to the incorporation by reference in the Registration Statements on Form S-8 (No 33-21735 and No. 33-350293) of KSW, Inc. of our report dated February 9, 2006, except for Note 17(A) and (B), as to which the dates are February 13, 2006 and March 1, 2006, and for Note 17(C), as to which the date is March 14, 2006 relating to the consolidated financial statements which are included in this Annual Report on Form 10-K. MARDEN, HARRISON & KREUTER Certified Public Accounts, P.C. /s/ Marden, Harrison & Kreuter White Plains, New York March 15, 2006