%LWAPP-3-REPLAY_ERR -- replay attack

Controllers have been receiving :
*spamReceiveTask: May 23 12:26:05.149: %LWAPP-3-REPLAY_ERR: spam_lrad.c:25502 Received replay error on slot 0, WLAN ID 1, count 1 from AP mac-address
Manual says:
Error Message    %LWAPP-3-REPLAY_ERR: Received replay error on slot [dec], WLAN ID
[dec], count [dec] from AP [hex]:[hex]:[hex]:[hex]:[hex]:[hex]
Explanation    The controller has received a replay error on the specified AP and WLAN.
Recommended Action    Check if there is a replay attack in the network.
Question:
How can I check if there is a replay attack in the controllers ?
AIR-WLC2112-K9 and AIR-WLC2106-K9
Can I also check in APs ?
AIR-LAP1131AG-A-K9  and AIR-LAP1131AG-A-K9 

Hi,
Please check this post. may be it helps.
https://supportforums.cisco.com/discussion/11156266/users-getting-dropped-sessions-wireless
Regards

Similar Messages

  • LWAPP-3-REPLAY_ERR and load balancing issue

    Guys, I was trying to troubleshoot this error in my WLC
    Nov 24 00:30:01 wlc1: *spamApTask5: Nov 24 00:30:01.883: #LWAPP-3-REPLAY_ERR: spam_lrad.c:35169 The system has received replay error on slot 0, WLAN ID 1, count 1 from AP 08:d0:9f:23:4f:e0
    I did some search and I was trying to check if there was any replay attack in the network but I don't know where to start and kept searching for other reasons, and got an anwser in other blog. And this issue could be related to a Load-balancing config.
    Eventhough,I've got Load-Balancing disable in all my WLAN's but still got these counters. How can I check if those are false positives?
    (wlc-1) >show load-balancing 
    Aggressive Load Balancing........................ per WLAN enabling
    Aggressive Load Balancing Window................. 10 clients
    Aggressive Load Balancing Denial Count........... 3 
                                                        Statistics
    Total Denied Count............................... 17682 clients
    Total Denial Sent................................ 30891 messages
    Exceeded Denial Max Limit Count.................. 5032 times
    None 5G Candidate Count.......................... 206270 times
    None 2.4G Candidate Count........................ 5040 times
    In the GUI the Load-Balancing is DISABLED per WLAN.

    yes, even I've upgraded my entire campus to 1702i and 2702i lightweight AP's with 8.0.115.0 code in my WLC I still got huge amount of LWAPP Replay Erros, please check the summuary of erros during yesterday..
         14 APF-1-CONFLICT_IN_ASS_REQ: apf_80211.c
         14 APF-3-CHECK_EXT_SUPP_RATES_FAILED: apf_utils.c
         14 APF-3-CHECK_SUPP_RATES_FAILED: apf_utils.c
         15 APF-3-NO_FRAMED_IP_ADDRESS: apf_radius.c
        638 APF-3-VALIDATE_DOT11i_CIPHERS_FAILED: apf_rsn_utils.c
        103 DOT1X-3-AAA_AUTH_SEND_FAIL: 1x_aaa.c
       2427 DOT1X-3-ABORT_AUTH: 1x_bauth_sm.c
         55 DOT1X-3-AUTHKEY_TX_TRANS_ERR: 1x_kxsm.c
         20 DOT1X-3-CLIENT_NOT_FOUND: dot1x_msg_task.c
       1365 DOT1X-3-INVALID_REPLAY_CTR: 1x_eapkey.c
         69 DOT1X-3-INVALID_WPA_KEY_MSG: 1x_eapkey.c
        296 DOT1X-3-INVALID_WPA_KEY_MSG_STATE: 1x_eapkey.c
          2 DOT1X-3-INVALID_WPA_KEY_STATE: 1x_eapkey.c
        923 DOT1X-3-WPA_SEND_STATE_ERR: 1x_kxsm.c
          7 DTL-3-ARP_CLIENT_IP_DUPLICATED: dtl_arp.c
          2 IPV6-3-CREATE_BINDING_FAILED: ipv6_net.c
          2 IPV6-3-ORPHAN_ADDR_LEARNING_FAILED: ipv6_net.c
          2 LOG-3-Q_IND: 1x_eapkey.c
          3 LOG-3-Q_IND: rrmChanUtils.c
         22 LOG-3-Q_IND: spam_lrad.c
       5120 LWAPP-3-REPLAY_ERR: spam_lrad.c
          2 LWAPP-3-VENDOR_PLD_VALIDATE_ERR: spam_lrad.c
          3 RRM-3-RRM_LOGMSG: rrmChanUtils.c
        615 RRM-3-RRM_LOGMSG: rrmLrad.c
          2 SISF-3-INTERNAL: sisf_shim_utils.c

  • IV and hmac from shared secret, and replay attacks.

    Hello all!
    I am working on a client server project where i use the diffi-hellman keyexchange.
    both server and client has the secret and can decrypt enc messages from eachother.
    Q1:Up to now i have only used a predifiened IV for the 3des cbc cipher. But I would like to generate a IV from the shared secret somhow. Which way is the most secure way to do that?
    the way things look now i enc/dec by my self whithout the cipheroutputstream, (got to much trouble whith the cipherbuffers) and just send it over by my self.
    I would like to use a SHA1 hmac and send that over whith the msg.
    Q2: I now use println for sending, is it ok to first send the enc msg, and then send the hmac after, from security point of view?
    Q3: how do i use my shared secre to calculate a sha1 hmac from the msg?
    Q4: how do i use a timestamp whith the above cipher and hmac in a secure way to prevent replay attacks?
    Sry for the many questions, I have tried for several days to figure some of this stuff out, any help/code is appreciated
    /Mike

    Bossk wrote:
    Thanks for your reply.
    I've read most (if not all) .net to java migration threads I could find. None helped me with my problem.
    If I understood your reply correct, there are some fundamental flaws in the .NET encrypt/decrypt routines:Yes but I am not aware of any in the code you are using.
    >
    - the AES blocksize is set to 256 but can only be 128 bitsYour .NET code is using Rijndael which does allow a block size of 256 but your Java code is using AES which does not allow a block size of 256. You need to get a Rijndael implementation from another provider. I suggest you look at BouncyCastle. They may also have an Rfc2898DeriveBytes port.
    - ECB mode is used. However, ECB does not use an IV, right? So the .NET classes must be ignoring this parameter.Yes. What I find interesting about the .NET crypt routines is that they (almost) never throw exceptions when illegal or inappropriate parameters are used.
    >
    I also have the PasswordDerivedBytes class from the thread you linked, when I try to decode using this code it still does not work:.NET class PasswordDerivedBytes is a mess but you actually need an implementation of RFC2898 some of which PasswordDerivedBytes implements. Check with BouncyCastle provider they may have an Rfc2898DeriveBytes class but if not then you need to implement the relevant part of RFC2898. The problem you will have is knowing which of the 5 RFC2898 key generation algorithms is actually uses with the .NET code.

  • How to prevent multiple submit (replay attack)?

    Hi there, I have managed to submit the form to the server side. However, is there any way to prevent the client side from keep submitting the form? I have heard of using random number, but I don't know what javascript code to place in the web page. Can anybody help, because I am stuck in the problem for quite a long time.
    Thanks,
    Rocky.

    r0ckytay89 wrote:
    Hi there, I have managed to submit the form to the server side. However, is there any way to prevent the client side from keep submitting the form? I have heard of using random number, but I don't know what javascript code to place in the web page. Can anybody help, because I am stuck in the problem for quite a long time.
    Thanks,
    Rocky.Well there are two ways of implementing this.
    1).Javascript Solutions (and mind you never always try disabling the submit button )
    [http://www.elated.com/articles/preventing-multiple-form-submits/]
    [http://www.web-source.net/web_development/form_submission.htm]
    2).Maintaining state of the form on server side and using a token for preventing mutiple submits.
    try to go through the solutions recommended in the below articles
    [http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=50&t=016689]
    [http://faq.javaranch.com/java/HowToPreventMultipleFormSubmits] (In struts)
    Or a more generalized solution is given in the article below
    [http://www.onjava.com/pub/a/onjava/2003/04/02/multiple_submits.html]
    Hope that might help :)
    REGARDS,
    RaHuL

  • [ForumFAQ]How to troubleshoot error "SSPI handshake failed with error code 0x80090324"

    Understanding the problem:
    When connect to SQL Server with Windows authentication, you may receive the following message in the SQL Server error log:
    SSPI handshake failed with error code 0x80090324, state 14 while establishing a connection with integrated security; the connection has been closed.
    Security Support Provider Interface (SSPI) is a set of Windows APIs that allows for delegation and mutual authentication over any generic data transport layer, such as TCP/IP sockets. SQL Server supports Kerberos indirectly through the Windows Security Support
    Provider Interface (SSPI) when SQL Server is using Windows Authentication.
    "SSPI Handshake Failed" error happens usually when connection failed between the server and domain controllers or failed Kerberos Authentication. There are many reason for SSPI Handshake error to appear in SQL Server error log.
    Troubleshot the problem:
    Download and install the Windows error code lookup tool Err.exe to view error descriptions for Windows Error Codes.
    The error code 0x80090324 (SEC_E_TIME_SKEW) means "clock on client and server machines are skewed". In most case, this is a Kerberos issue. Kerberos is using a timestamp to protect against replay attacks. The maximum time skew that can be tolerated
    between a ticket's timestamp and the current time at the KDC is 5 minutes by default.
    Also check the Windows Event Log of client machine, domain controller and the SQL Server machine for existence of W32time error messages.
    The solution:
    Make sure the clock of client server, domain controller and the server running SQL Server are within five minutes of each other. Or Resynchronize the clock by run w32tm /resync on client machine and SQL Server machine.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    This error can happen due to Active Directory configuration issue or Network related issues. Assuming they are fine,
    another reason could be related to fail Kerberos Authentication to connect to SQL Server.
    In Windows 2003 and above, the default method of establishing a connection is Kerberos but if it fails, then connection may be established using NTLM. An error may be registered on SQL Server error log due to Kerberos failure.
    To confirm if you have any database connection using Kerberos authentication, run this on your SQL Server
    SELECT distinct auth_scheme FROM sys.dm_exec_connections
    If you only see NTLM and SQL then, there is no Kerberos connection.
    To use Kerberos, the client and SQL Server must be in the same domain or trusted domains and a Service Principal Name (SPN) must be registered with Active Directory for SQL Server service account.
    You can check if the service account already has SPN, by running this on the SQL Server
    setspn -l <domain\sqlserviceaccount>
    If you don't see anything starting with MSSQLSvc\ then the account is not setup with SPN.
    You can manually register SPN as a Domain Administrator using these commands.
    To      create an SPN for the NetBIOS name of the SQL Server use the following      command:
    setspn –A MSSQLSvc/<SQL Server computer name>:1433      <Domain\Account>
    To      create an SPN for the FQDN of the SQL Server use the following command:
    setspn      -A MSSQLSvc/<SQL Server FQDN>:1433 <Domain\Account>
    If SQL Server service account is granted "Validated write to service principal name" privilege in Active Directory, SQL Server database engine will register itself when it starts and unregisters at shutdown. If you Domain Administrators do not permit this setting
    then you should manually register the SPN and the SSPI error will go away.
    Also the SQL Server service account must be granted "Account is trusted for delegation" privilege in Active Directory. If your SQL Server connects to other SQL Server using Linked Server then the server must also be granted "Trust this computer for delegation
    to any service" privilege.
    For a named instance, you can use the FQDN of the named instance instead of SQL Server FQDN and use the port number.
    For a clustered server, you should use the FQDN of the SQL Server virtual name. In this case you will need two entries, one with port name and one without such as
    setspn -A MSSQLSvc/<Virtual SQL Server FQDN> <Domain\Account>
    setspn -A MSSQLSvc/<Virtual SQL Server FQDN>:1433 <Domain\Account>
    Kerberos authentication works when SQL Server, Service Account and Windows account accessing the SQL Server are in same windows domain. If anyone these are in different domain, there must be bidirectional trust established between the domains, otherwise it
    does not work.

  • Question about using net time

    I am trying to synchronize the time of my machine with another machine (target) on the local network by using "net time" command and found something strange for me.
    If I change the local time on my machine and then use "net time" to read or synchronize from the target, the command is successful.
    However, if I changed the time of the target with more than an hour and then use the "net time" on my machine to read or synchronize it with the target, it will fail with "System error 5 has occurred. Access is denied." What is the reason
    for that? Is the "net time" restricted by network time?
    Roy

    It could be a couple of reasons. Firstly it could be a Kerberos issue, authentication is time sensitive to reduce the danger of replay attacks. Can you connect to network shares with the same account? Try using the /setsntp option as this will bypass authentication
    and use just the sntp protocol (I could be wrong on this, its been a while since I touched net time!)
    Time correction works in two ways in Windows. If the time offset is below a certain offset (which I believe is an hour) the time will be skewed to catch up. i.e. time will run faster or slower to make up the difference without a drastic time change. Alternatively
    if the time offset is over that threshold it will be forcibly changed. It could be that your account doesn't have permission to force that change.

  • NTP - Remote Domain Computers

    If we have a GPO to have windows clients sync their time from external sources instead of domain hierarchy (DCs, PDC Emulator Role Server, etc.), would those clients still (by virtual of being joined to a domain) want to communicate with a Domain Controller
    as a time source? We were testing a GPO for remote users to have them Sync Time externally, but noticed when they are in the VPN they are still trying to talk to DCs via UDP 123. Possibly this is related to the CrossSiteSyncFlags value being a 2?
    Thanks,
    JefroDHusker
    P.S.
    Forest Functional Level is 2003
    Domain Functional Level is 2008

    Hi,
    With manually-specified synchronization, you can designate a single peer or a list of peers from which a computer obtains the time. If the computer is not a member of a domain,
    that computer must be manually configured to synchronize with a specified time source. By default, a computer that is a member of a domain is configured to synchronize from the domain hierarchy. Manually-specified synchronization is most useful for the forest
    root of the domain or for computers that are not joined to a domain. Manually specifying an external NTP server to synchronize with the authoritative computer for your domain provides reliable time. However, configuring the authoritative computer for your
    domain to synchronize with a hardware clock is actually a better solution to provide high accuracy and improved security to your domain.
    Note Manually specified time sources are not authenticated unless
    a specific time provider is written for them, and they are therefore vulnerable to attacks. Also, if a computer synchronizes with a manually-specified source instead of its authenticating domain controller, the two computers might be out of synchronization,
    and Kerberos authentication would therefore fail. Other actions that require network authentication, such as printing or file sharing, could also fail. If only the forest root is configured to synchronize with an external source, all other computers within
    the forest remain synchronized with each other, making replay attacks difficult.
    Microsoft strongly recommends that you configure the authoritative Time Server to obtain the time from a hardware source. When you configure the authoritative Time Server
    to sync with an Internet time source, there is no authentication. Microsoft also recommends that you lower your time correction settings for your servers and for your stand-alone clients. These recommendations provide more accuracy and greater security to
    your domain.
    More information:
    How to configure an authoritative time server in Windows XP
    http://support.microsoft.com/kb/314054
    The relate third party article:
    How to Configure Your Windows Server to Use an External Time Source
    http://blog.techgalaxy.net/archives/4116
    Hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Creating Token for Login Method

    I am writing a login method that will authencticate user and return token for web services. Next time user will send is token and we will validate the token but requirement is that we donot wnat to keep any state of token at server.What does it mean that when we receive token, we should be able to detremine is it a valid token or not.(This implied token can't be forged by any user).
    I have written a function using KeyPairGenerator, please have a look and let me know if you see any security issue.
    Design is
    token generateToken(userid) {
    hash = hash(userid) ------------------- ONE
    Signature = Encrypt (Private key , hash) --------------- TWO
    return hash + " " + Signature
    bool isValid(token) {
    separate part 1 and part 2 of toekn (delimeter is space)
    Signature = Encrypt (Public key , part1)
    if signature == part2
    token is valid
    else token is invalid
    Code is
    PublicKey privateKey ;
    PrivateKey publicKey ;
    KeyPairGenerator keyGen;
    SecureRandom random ;
    KeyPair keypair;
    public String generateToken() throws Exception{
    keyGen = KeyPairGenerator.getInstance("DSA");
    random = SecureRandom.getInstance("SHA1PRNG", "SUN");
    keyGen.initialize(512 , random);
    keypair = keyGen.genKeyPair();
    privateKey = keypair.getPrivate();
    publicKey = keypair.getPublic();
    String token = userName;
    byte[] part1 = getHash(1000, token , generateSalt());
    /* Create a Signature object and initialize it with the private key */
    Signature dsa = Signature.getInstance("SHA1withDSA", "SUN");
    dsa.initSign(privateKey);
    /* Update and sign the data */
    dsa.update(part1, 0 , part1.length) ;
    /* Generate a signature for it */
    byte[] realSig = dsa.sign();
    String tokenToReturn = byteToBase64(part1) + " " + byteToBase64(realSig) ;
    return tokenToReturn;
    public void verifyToken(String token) throws Exception{
    int space = token.indexOf(" ");
    String part1 = token.substring(0 , space);
    String part2 = token.substring(space+1);
    /* create a Signature object and initialize it with the public key */
    Signature sig = Signature.getInstance("SHA1withDSA", "SUN");
    sig.initVerify(publicKey);
    byte[] bPart1 = base64ToByte(part1);
    byte[] bPart2 = base64ToByte(part2);
    /* Update and sign the data */
    sig.update(bPart1, 0 , bPart1.length) ;
    if ( sig.verify(bPart2) )
         System.out.println("signature verifies: " );
    else
    System.out.println("signature does not verifies: " );
    Does this code look right ??? Please let me know if you see any pitfalls or know better way to create token

    Hello,
    one conceptual problem is the fact that once you generate such a token it is valid forever. One idea would be to incorporate the date/time of generation, so that you have some kind of timeout mechanism if the token is too old. Again, the token mechanism will be susceptible to replay attacks for the token's validity period.
    For my part, I would tend to go with some kind of one-time token design. Even if you are constrained not to use a database, you could use an in-memory structure to keep track of the generated tokens, mapping them to the users requested them and removing them on an explicit logout or after an expiration time period. This way you don't depend on a timestamp, which implies that you keep a clock well-synchronized. Just my $.02.
    Kind regards,
    Anestis

  • Logout Not Invalidating Session

    One of our applications was recently scanned by Security and they were able to do a 'Session Replay Attack' in our application. The cookie does not appear to be expiring upon logout which allows a user to log back in under that session even after closing everything out. Our current Authentication Scheme is set to the following on logout:
    wwv_flow_custom_auth_std.logout?p_this_flow=&APP_ID.&p_next_flow_page_sess=&APP_ID.:1000:&SESSION.
    We are currently using APEX 2.2, can you provide any guidance as to how to expire the session cookie so no one can get in again?
    Thank you,
    Amy

    Sorry for the delay in responding, I had to get the information from the security person that was able to do this. Here are the responses below:
    I need more details of what was done in this scenario. Are you saying that the logout procedure did not change the value of the cookie in the browser session? How did you determine that?
    - The session cookie assigned when logging in the first time did not expire immediately when the person logged out. Without logging in, all I would need to do is resubmit the session cookie in my requests to gain access to the application. I accomplished this using a web proxy to capture requests between the browser and server allowing me to manipulate data sent to /from the server.
    What was the value of the session cookie after the logout occurred?
    - I merely reused the session cookie already provided. Cookie submitted was: WWV_CUSTOM-F_2695714197338609_1100=04ACEC38BA5368CD
    Then by "after closing everything out" the user was able to enter username/password in the login page and run the application again in the original session, is that right?
    - No username / password needed. Session cookie is used as my validation.
    Does this have anything to do with the previous or new version of the session cookie?
    - Reusing previous cookie. Replacing new cookie with old cookie. Hence, ‘session replay attack’.
    In words, if you look at the value of the original session cookie before the logout and the cookie value after logout and the cookie value after the second login, are all three values (or at least the first and third values) the same?
    - I am reusing / substituting an old cookie and replacing new ones with the old one.
    Or are you making no statements about cookies at all but saying only that being able to use a session ID that was previously used (and logged out of) seems to be possible by the same named user in the same application.
    - Cookies are used for Session ID. Anyone can reuse that cookie / session ID and masquerade as that user.
    Thanks for the help and let me know if you need anymore information or clarifications.
    Amy

  • Authentication In Mobile IP

    Dear all
    I start learning about Mobile IP( read the RFC 3344) and some related RFC documents. Now i have a concern question, Hope that you  clear a canal of obstruction because it makes me getting mad.
    As i know about Mobile IP like this:
    +The Foreign Agent send advertisement messege periodically (ICMP)
    +When the Mobile Node moves to a new place, It will receive the advertisement messege and send the Registration request. The registration request uses the IP of Mobile node ( in case of located- care-of address )  or NAI  ( in case of co-located care-of address) to authentication mobile node with Home agent.
    There are some security problems here:
    + Replay Attacks: can be resisted by using identifier field in Registration request message
    + Modify the Packet : can be resisted by using the checksum and HMAC-MD5 to guarantee the packet integration
    But i am a little bit confused with man-in-the-middle attack. I supposed that someone capture the registration request packet and he know the authention property (IP of mobile node or NAI) , after that he can use this authentication to use the service?
    I'm thinking of the below scenario:
    Mobile Node : The digest message A = HMAC-MD5(IP, identifier, Secret  key) and after that it sends to the Home Agent
    Home Agent : Computer the digest messge B = HMAC-MD5(IP, Identifier ,Secrect  key' ) ( the IP, Identifier  from the registration message ) and it stores the secret key
    We compare   The digest message A (in registration message ) with  the digest messge B . It will be ok if 2 of digest message are equal.
    In this case, We consider 3 authentioncation scenario: Mobile Node -- Home Agent , Mobile Node - Foreign Agent and Foreign Agent -- Home Agent
    How can we authenticate  Mobile Node - Foreign Agent ?
    Please help me, I do appreciate your help.

    Hi Marc!
    Thank you for your answer!
    I enable only Basic Auth for my Internal Network, but still no auth window for mobile browsers.
    If I enable only Basic authentication, my Windows Users asked to prompt their credentials in their Browsers. So, I enable Basic with Integrated.
    Maybe I'm doing something wrong?

  • FPN in Portal 7.3 not working

    Hello All,
    FPN in portal 7.3 is not working. Please advice.
    Errors found in logs -
    1.
    Could not validate SPNEGO token.
    [EXCEPTION]
    com.sap.engine.services.security.authentication.umapping.UserMappingNoSuchUserException: No user with account attributes [[namespace=com.sap.security.core.authentication, name=principal, value=vs-sys45.IBM-ERP, isCaseSensitive=false], [namespace=com.sap.security.core.authentication, name=realm, value=ALJAZEERA.TV, isCaseSensitive=false]] found
    at com.sap.engine.services.security.authentication.umapping.UserMappingServiceImpl.getUserByAccountAttributes(UserMappingServiceImpl.java:184)
    at com.sap.security.core.server.jaas.spnego.util.SPNEGOUserMappingUtil.searchUser(SPNEGOUserMappingUtil.java:82)
    2.
    Could not validate SPNEGO token.
    [EXCEPTION]
    java.lang.Exception: Store of token in replay cache failed. Possible replay attack detected.
    at com.sap.security.core.server.jaas.spnego.krb5.KrbApReq.throwValidationException(KrbApReq.java:125)
    at com.sap.security.core.server.jaas.spnego.krb5.KrbApReq.validate(KrbApReq.java:118)
    at com.sap.security.core.server.jaas.SPNegoLoginModule.validateSPNEGOToken(SPNegoLoginModule.java:323)
    at com.sap.security.core.server.jaas.SPNegoLoginModule.processAuthorizationHeader(SPNegoLoginModule.java:504)
    at com.sap.security.core.server.jaas.SPNegoLoginModule.login(SPNegoLoginModule.java:154)
    at com.sap.engine.services.security.login.LoginModuleLoggingWrapperImpl.login(LoginModuleLoggingWrapperImpl.java:254)
    at com.sap.engine.services.security.login.ModulesProcessAction.run(ModulesProcessAction.java:66)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.services.security.login.FastLoginContext.login(FastLoginContext.java:269)
    at com.sap.security.core.logon.imp.SAPJ2EEAuthenticator.logon(SAPJ2EEAuthenticator.java:876)
    3.
    LOGIN.FAILED
    User: N/A
    IP Address: 10.234.11.20
    Authentication Stack: ticket
    Authentication Stack Properties:
    Login Module                                                               Flag        Initialize  Login      Commit     Abort      Details
    1. com.sap.security.core.server.jaas.EvaluateTicketLoginModule             SUFFICIENT  ok          false                 true     
            #1 ume.configuration.active = true
    2. com.sap.security.core.server.jaas.SPNegoLoginModule                     OPTIONAL    ok          exception             true       Trigger SPNEGO authentication.
    3. com.sap.security.core.server.jaas.CreateTicketLoginModule               SUFFICIENT  ok          false                 true     
    4. com.sap.engine.services.security.server.jaas.BasicPasswordLoginModule   REQUIRED    ok          false                 false    
    5. com.sap.security.core.server.jaas.CreateTicketLoginModule               REQUIRED    ok          false                 true
    4. Can't map exception.
    [EXCEPTION]
    com.sap.engine.services.security.exceptions.BaseLoginException: Cannot authenticate the user.
    at com.sap.engine.services.security.login.ModulesProcessAction.run(ModulesProcessAction.java:131)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.services.security.login.FastLoginContext.login(FastLoginContext.java:269)
    at com.sap.security.core.logon.imp.SAPJ2EEAuthenticator.logon(SAPJ2EEAuthenticator.java:876)
    Caused by: javax.security.auth.login.LoginException: NTLM token received in authorization header.
    at com.sap.security.core.server.jaas.SPNegoLoginModule.failedAuthenticationException(SPNegoLoginModule.java:369)
    at com.sap.security.core.server.jaas.SPNegoLoginModule.checkAuthorizationHeaderToken(SPNegoLoginModule.java:463)
    at com.sap.security.core.server.jaas.SPNegoLoginModule.parseSPNEGOToken(SPNegoLoginModule.java:282)
    at com.sap.security.core.server.jaas.SPNegoLoginModule.processAuthorizationHeader(SPNegoLoginModule.java:484)
    at com.sap.security.core.server.jaas.SPNegoLoginModule.login(SPNegoLoginModule.java:154)
    at com.sap.engine.services.security.login.LoginModuleLoggingWrapperImpl.login(LoginModuleLoggingWrapperImpl.java:254)
    at com.sap.engine.services.security.login.ModulesProcessAction.run(ModulesProcessAction.java:66)
    ... 59 more
    Have investigated a lot since last 3 days, tried many possible solutions but they are not working like to mention a few,
    SAP Note # 1649110, http://scn.sap.com/people/holger.bruchelt/blog/2010/04/08/new-spnego-login-module--just-around-the-corner,
    http://scn.sap.com/people/holger.bruchelt/blog/2008/01/09/configuring-and-troubleshooting-spnego--part-1
    Please advice.
    Thanks a tonne,
    Ritu

    Hi Ritu
    Could you check this SAP Notes
    1679902 - java.lang.NumberFormatException: multiple points in SPNego
    1732610 - SPNego ABAP: Troubleshooting Note
      1783663 - SPNego Authentication based relogin failed
    Regards
    Sriram

  • Do someone know the behaviour of the wrap() method?

    Hi all,
    I'm working with an applet that need R-MAC but no card implements it, so i'm implementing my own secure channel.
    But I want to do it well, so..
    do someone know how the wrap() method is supposed to work?
    I have 2 hypothesis:
    1 - the unwrap() method processing remembers the r-mac state, and then the wrap() method has only to be given the data length, actual data and sw.
    2 - the unwrap() method remembers nothing, so the Response APDU has to be appended to the Command APDU and the whole buffer must be passed to wrap(), which means that the length of the command/response pair must not exceed 256 bytes.
    What do you think is the correct behaviour?

              case INS_INITUPDATE:
                   this.flagBuf[OFFSET_CMAC_FLAG] = CMAC_RECALCULATION_NOT_NEEDED;
                   this.flagBuf[OFFSET_SECURE_CHANNEL_FLAG] = SECURE_CHANNEL_CLOSED;
                   // clear CLEAR_ON_DESELECT data if no SELECT before
                   if(this.flagBuf[OFFSET_SELECT_FLAG] != SELECT_APDU_BEFORE){
                        Util.arrayFillNonAtomic(this.lastCMAC, (short)0, (short)this.lastCMAC.length, (byte)0);
                        Util.arrayFillNonAtomic(this.lastRMAC, (short)0, (short)this.lastCMAC.length, (byte)0);
                        Util.arrayFillNonAtomic(this.icvKeyData, (short)0, (short)this.icvKeyData.length, (byte)0);
                   this.flagBuf[OFFSET_SELECT_FLAG] = OTHER_APDU_BEFORE; 
                   // extract host challenge
                   if(dataLength != LENGTH_OF_HOST_CHALLENGE){
                        ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
                   // create session keys
                   // APDU buffer construction
                   // |0     ...    13|14    ...    29|30   ...   45|
                   // | incoming APDU |derivation data|tmp key value|
                   // ENC-Key
                   Util.arrayCopyNonAtomic(DERIVATION_DATA_ENC_KEY, (short)0, buf, (short)14, (short)2);
                   Util.setShort(buf, (short)16, this.sequenceCounter);
                   this.tmpKey.setKey(this.s_ENC_key, (short)0);
                   this.tmpCipher.init(this.tmpKey, Cipher.MODE_ENCRYPT);
                   this.tmpCipher.doFinal(buf, (short)14, (short)16, buf, (short)30);
                   Util.arrayCopyNonAtomic(buf, (short)30, buf, (short)46, (short)8);
                   this.encKey.setKey(buf, (short)30);
                   // CMAC-Key
                   Util.arrayCopyNonAtomic(DERIVATION_DATA_CMAC_KEY, (short)0, buf, (short)14, (short)2);
                   Util.setShort(buf, (short)16, this.sequenceCounter);
                   this.tmpKey.setKey(this.s_MAC_key, (short)0);
                   this.tmpCipher.init(this.tmpKey, Cipher.MODE_ENCRYPT);
                   this.tmpCipher.doFinal(buf, (short)14, (short)16, buf, (short)30);
                   this.cmacKey.setKey(buf, (short)30);
                   // RMAC-Key
                   Util.arrayCopyNonAtomic(buf, (short)30, this.icvKeyData, (short)0, (short)8);
                   Util.arrayCopyNonAtomic(DERIVATION_DATA_RMAC_KEY, (short)0, buf, (short)14, (short)2);
                   Util.setShort(buf, (short)16, this.sequenceCounter);
                   this.tmpKey.setKey(this.s_MAC_key, (short)0);
                   this.tmpCipher.init(this.tmpKey, Cipher.MODE_ENCRYPT);
                   this.tmpCipher.doFinal(buf, (short)14, (short)16, buf, (short)30);
                   this.rmacKey.setKey(buf, (short)30);
                   // create card cryptogram
                   // APDU buffer construction
                // |30   ...    37|38     ...    39|40   ...    45|46  ...  53| <-- buf
                   // |Host Challenge|Sequence Counter|Card Challenge|DES padding|
                   Util.arrayCopyNonAtomic(buf, (short)5, buf, (short)30, (short)8);
                   Util.setShort(buf, (short)38, this.sequenceCounter);
                   Util.arrayCopyNonAtomic(this.cardChallenge, (short)0, buf, (short)40, (short)6);
                   Util.arrayCopyNonAtomic(DES_PADDING, (short)0, buf, (short)46, (short)8);
                   // we can save time if we reuse the initialized cipher
                   // for the encryption of the card challenge used for verification in EXT-AUTH
                // |0   ...        1|2     ...    8|9   ...     16| <-- swapBuf
                   // |Sequence Counter|Card Challenge|Host Challenge|
                   Util.arrayCopyNonAtomic(buf, (short)38, swapBuf, (short)0, (short)8); // counter + card challenge
                   Util.arrayCopyNonAtomic(buf, (short)30, swapBuf, (short)8, (short)8); // host challenge
                   Util.arrayCopyNonAtomic(DES_PADDING, (short)0, swapBuf, (short)16, (short)8); // DES Padding
                   this.tmpCipher.init(this.encKey, Cipher.MODE_ENCRYPT);
                   this.tmpCipher.doFinal(buf, (short)30, (short)24, buf, (short)4); // card cryptogram
                   this.tmpCipher.doFinal(swapBuf, (short)0, (short)24, swapBuf, (short)0); // host cryptogram
                   // build response APDU
                   // APDU buffer construction
                   // |0         ...        9|         10       | 11|12    ...     13|14    ...   19|20    ...    27|
                   // |Key Diversification Data|Key Version Number|SCP|Sequence Counter|Card Challenge|Card Cryptogram|
                   Util.arrayCopyNonAtomic(this.keyDiversicationData, (short)0, buf, (short)0, (short)10);
                   buf[10] = this.keyVersionNumber;
                   buf[11] = SECURE_CHANNEL_PROTOCOL;
                   Util.setShort(buf, (short)12, this.sequenceCounter);
                   Util.arrayCopyNonAtomic(this.cardChallenge, (short)0, buf, (short)14, (short)6);
                   apdu.setOutgoingAndSend((short)0, (short)28);
                   this.flagBuf[OFFSET_INIT_UPD_FLAG] = INIT_UPD_BEFORE; 
                   break;
              case INS_EXTAUTH:
                   this.flagBuf[OFFSET_SECURE_CHANNEL_FLAG] = SECURE_CHANNEL_CLOSED;
                   if(this.flagBuf[OFFSET_INIT_UPD_FLAG] != INIT_UPD_BEFORE){
                        this.flagBuf[OFFSET_CMAC_FLAG] = CMAC_RECALCULATION_NOT_NEEDED;
                        ISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);
                   this.flagBuf[OFFSET_INIT_UPD_FLAG] = OTHER_APDU_BEFORE;
                   // CLA BYTE = GP + SM
                   if(buf[ISO7816.OFFSET_CLA] != (byte)0x84){
                        this.flagBuf[OFFSET_CMAC_FLAG] = CMAC_RECALCULATION_NOT_NEEDED;
                        ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
                   // Minimum C_MAC (or CRMAC?)
                   if((buf[ISO7816.OFFSET_P1] & (byte)1) != C_MAC_ONLY) {
                        this.flagBuf[OFFSET_CMAC_FLAG] = CMAC_RECALCULATION_NOT_NEEDED;
                        ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
                   } else if(buf[ISO7816.OFFSET_P1] == C_MAC_ONLY)
                        this.flagBuf[OFFSET_SEC_LEVEL] = C_MAC_ONLY;
                   else if(buf[ISO7816.OFFSET_P1] == C_AND_R_MAC)
                        this.flagBuf[OFFSET_SEC_LEVEL] = C_AND_R_MAC;
                   else {
                        this.flagBuf[OFFSET_CMAC_FLAG] = CMAC_RECALCULATION_NOT_NEEDED;
                        ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
                   if(dataLength != LENGTH_OF_HOSTCRYPTOGRAM_AND_MAC){
                        this.flagBuf[OFFSET_CMAC_FLAG] = CMAC_RECALCULATION_NOT_NEEDED;
                        ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
                   if(!this.encKey.isInitialized()){
                        this.flagBuf[OFFSET_CMAC_FLAG] = CMAC_RECALCULATION_NOT_NEEDED;
                        ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
                   // 1st verify host cryptogram (encrypted card challenge)
                   // swapBuf holds our encrypted challenge, prepared in INIT-UPD
                   if(Util.arrayCompare(buf, ISO7816.OFFSET_CDATA, swapBuf, (short)16, (short)8) != 0){
                        this.flagBuf[OFFSET_SECURE_CHANNEL_FLAG] = SECURE_CHANNEL_CLOSED;
                        ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
                   // 2nd verify CMAC on EXT-AUTH
                   this.verifyCMAC(buf, dataLength);
                   // increment sequence counter to avoid 'Replay Attack'!
                   if(sequenceCounter != (short)0xFFFF)
                        this.sequenceCounter++;
                   // this MAC will be the initial ICV for R-MAC
                   Util.arrayCopyNonAtomic(lastCMAC, (short)0, lastRMAC, (short)0, LENGTH_OF_MAC);
                   this.flagBuf[OFFSET_SECURE_CHANNEL_FLAG] = SECURE_CHANNEL_OPENED;
                   break;
    <next post>

  • [solved] pacman 4 breaks if there's no /var/lib/pacman/sync/foo.db

    Allan had problems with his webhost: http://identi.ca/notice/87871795 After I have added
    [allanbrokeit]
    Server = http://allanmcrae.com/$repo/$arch
    to my pacman.conf, I couldn't use update and install packages anymore:
    [karol@black ~]$ pacman -Syu
    warning: database file for 'allanbrokeit' does not exist
    :: Synchronizing package databases...
    testing is up to date
    community-testing is up to date
    core is up to date
    extra is up to date
    community is up to date
    error: failed retrieving file 'allanbrokeit.db' from allanmcrae.com : The requested URL returned error: 404
    error: failed to update allanbrokeit (download library error)
    :: Starting full system upgrade...
    error: failed to prepare transaction (could not find database)
    [karol@black ~]$ pacman -S hdparm
    warning: database file for 'allanbrokeit' does not exist
    error: failed to prepare transaction (could not find database)
    hdparm is in [core]. pacman 3.5.4-4 throws a bunch of errors
    error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
    error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
    error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
    error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
    error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
    error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
    error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
    error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
    error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
    error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
    error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
    error: could not open file /var/lib/pacman/sync/allanbrokeit.db: Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
    but works and allows me to update and install stuff.
    Is it a feature of pacman 4?
    Allan's repo seems to be already back online, so you have to test it with some nonexistent repo & db.
    Last edited by karol (2012-01-07 22:48:29)

    Dan responded to my e-mail:
    Dan McGee wrote:
    Yes, this was mostly an intended change.
    Note that you can do an -R operation (or anything not requiring sync databases) just fine. However, once we hit any machinery that requires sync databases to be present, we require all configured ones are accounted for. This is for a few reasons:
    1) dependency resolving if you have 1 out-of-date database and 4 up-to-date ones, things can get ugly or messed up.
    2) integrity- if you insist on a database being signed, we'd rather not proceed with nothing.
    3) replay attacks- what you don't fully see in the above situation is we also validate the signature on the database at load time; if that were to fail we'd also bail out. This is so pacman is capable of verifying the expiration time on a database signature; it makes sense to only allow database signatures to be valid for a week at a time so people know they have out-of-date repo metadata.
    Closing.

  • Orchestrator REST API & principal holder-of-key token

    Hello,
    I was just reading over the REST documentation regarding authentication when using SSO.  What I am unsure about is how to retrieve the "principal holder-of-key token".  If anyone has suggestions around this I would appreciate it.
    Thanks,
    Joe

    Hi,
        You are almost there, the token in the Authorization header should follow this :
    Authorization: SIGN token="...",
                   nonce="137131200:dj83hs9s",
                   bodyhash="k9kbtCIy0CkI3/FEfpS/oIDjk6k=",
                   signature_alg="RSA-SHA256",
                   signature="..."
    Where :token              REQUIRED. The SAML2 token identifying the caller. The value is calculated as BASE64(GZIP(SAML2)).
    nonce              REQUIRED. A unique string generated by the client allowing the server to identify replay attacks and reject such requests.
                                 The strings must be unique across all requests of a single client. The definition is as specified in Section 3.1
                                 of draft-ietf-oauth-v2-http-mac with one difference - the first component should be the current time expressed in
                                 the number of seconds since January 1, 1970 00:00:00 GMT with no leading zeros.
    bodyhash           OPTIONAL. A hash value computed as described in Section 3.2 of draft-ietf-oauth-v2-http-mac over the entire HTTP request
                                 entity body (as defined in Section 7.2 of RFC 2616). Note that the body hash may be missing only if there is no
                                 request body, i.e. empty body. Otherwise it is required.
    signature_alg      REQUIRED. The signature algorithm used by the client to sign the request.
                                 This proposal defines "RSA-SHA256", "RSA-SHA384" and "RSA-SHA512". More algorithms could be added in future.
    signature          REQUIRED. A message signature calculated over the normalized request as
                                 BASE64(signature-algorithm(private key, request)). The request normalization is done
                                 as defined in Section 3.3.1 of draft-ietf-oauth-v2-http-mac with two exception - (a) the body hash is included without
                                 BASE64 applied and (b) no "ext" field is appended. All text based fields in the normalized request
                                 are encoded in UTF-8.

  • Man in the middle

    Guys whats the best defense against Man in the middle attacks???
    for Client Server apps

    What normally prevents a man-in-the-middle attack is a certificate authority such as Verisign. Verisign acts as the trusted third party in an exchange. They certify that the public key you receive was transmitted by the proper sender.
    As an aside, you also have to worry about replay attacks. These can easily be stopped by embedding a timestamp in the encrypted message payload.
    - Saish

Maybe you are looking for