IBM Corp. said on Wednesday it agreed to buy Internet Security Systems Inc. for $1.3 billion, in a move to beef up its product line in the rapidly growing business of Internet security.